SplFileObject::fseek

(PHP 5 >= 5.1.0, PHP 7) Seek to a position public int SplFileObject::fseek ( int $offset [, int $whence = SEEK_SET ] ) Seek to a position in the file measured in bytes from the beginning of the file, obtained by adding offset to the position specified by whence. Parameters: offset The offset. A negative value can be used to move backwards through the file which is use

SplFileObject::fscanf

(PHP 5 >= 5.1.0, PHP 7) Parses input from file according to a format public mixed SplFileObject::fscanf ( string $format [, mixed &$... ] ) Reads a line from the file and interprets it according to the specified format, which is described in the documentation for sprintf(). Any whitespace in the format string matches any whitespace in the line from the file. This means that even a tab \t in the format string can mat

SplFileObject::fread

(PHP 5 >= 5.5.11, PHP 7) Read from file public string SplFileObject::fread ( int $length ) Reads the given number of bytes from the file. Parameters: length The number of bytes to read. Returns: Returns the string read from the file or FALSE on failure. Notes: Note that SplFileObject::frea

SplFileObject::fputcsv

(PHP 5 >= 5.4.0, PHP 7) Write a field array as a CSV line public int SplFileObject::fputcsv ( array $fields [, string $delimiter = "," [, string $enclosure = '"' [, string $escape = "\" ]]] ) Writes the fields array to the file as a CSV line. Parameters: fields An array of values. delimiter The optional delimiter parameter sets th

SplFileObject::fpassthru

(PHP 5 >= 5.1.0, PHP 7) Output all remaining data on a file pointer public int SplFileObject::fpassthru ( void ) Reads to EOF on the given file pointer from the current position and writes the results to the output buffer. You may need to call SplFileObject::rewind() to reset the file pointer to the beginning of the file if you have already written data to the file. Returns: Returns the numbe

SplFileObject::flock

(PHP 5 >= 5.1.0, PHP 7) Portable file locking public bool SplFileObject::flock ( int $operation [, int &$wouldblock ] ) Locks or unlocks the file in the same portable way as flock(). Parameters: operation operation is one of the following: LOCK_SH to acquire a shared lock (reader). LOCK_EX to acquire an exclusive lock (writer). LOCK_UN to release a lock

SplFileObject::fgetss

(PHP 5 >= 5.1.0, PHP 7) Gets line from file and strip HTML tags public string SplFileObject::fgetss ([ string $allowable_tags ] ) Identical to SplFileObject::fgets(), except that SplFileObject::fgetss() attempts to strip any HTML and PHP tags from the text it reads. Parameters: allowable_tags Optional parameter to specify tags which should not be stripped.

SplFileObject::fgets

(PHP 5 >= 5.1.0, PHP 7) Gets line from file public string SplFileObject::fgets ( void ) Gets a line from the file. Returns: Returns a string containing the next line from the file, or FALSE on error. Exception: Throws a RuntimeException if the file cannot be read. Examples: SplFileObject::fgets() example

SplFileObject::fgetcsv

(PHP 5 >= 5.1.0, PHP 7) Gets line from file and parse as CSV fields public array SplFileObject::fgetcsv ([ string $delimiter = "," [, string $enclosure = "\"" [, string $escape = "\\" ]]] ) Gets a line from the file which is in CSV format and returns an array containing the fields read. Parameters: delimiter The field delimiter (one character only). Defaults as a co

SplFileObject::fgetc

(PHP 5 >= 5.1.0, PHP 7) Gets character from file public string SplFileObject::fgetc ( void ) Gets a character from the file. Returns: Returns a string containing a single character read from the file or FALSE on EOF. WarningThis function may return Boolean FALSE, but may also return a non-Boolean value which evaluates to FALSE. Please read the section on Booleans for more information. Use the