1); while (fgetc($f) !== false) $i++; flock($f, LOCK_UN); fclose($f); return $i; }