SplFileObject::next

(PHP 5 >= 5.1.0, PHP 7) Read next line public void SplFileObject::next ( void ) Moves ahead to the next line in the file. Returns: No value is returned. Examples: SplFileObject::next() example <?php // Read through file line by line $file = new SplFileObject("misc.txt"); while (!$file->eof()) {     echo $file-&g

SplFileObject::getCsvControl

(PHP 5 >= 5.2.0, PHP 7) Get the delimiter and enclosure character for CSV public array SplFileObject::getCsvControl ( void ) Gets the delimiter and enclosure character used for parsing CSV fields. Returns: Returns an indexed array containing the delimiter and enclosure character. Examples: SplFileObject::getCsvControl() example

SplFileObject::getCurrentLine

(PHP 5 >= 5.1.2, PHP 7) Alias of SplFileObject::fgets() This method is an alias of SplFileObject::fgets().

SplFileObject::getFlags

(PHP 5 >= 5.1.0, PHP 7) Gets flags for the SplFileObject public int SplFileObject::getFlags ( void ) Gets the flags set for an instance of SplFileObject as an integer. Returns: Returns an integer representing the flags. Examples: SplFileObject::getFlags() example <?php $file = new SplFileObject(__FILE__, "r"); if (

SplFileObject::key

(PHP 5 >= 5.1.0, PHP 7) Get line number public int SplFileObject::key ( void ) Gets the current line number. Note: This number may not reflect the actual line number in the file if SplFileObject::setMaxLineLen() is used to read fixed lengths of the file. Returns: Returns the current line number. Examples: SplFileObject::key() e

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::ftell

(PHP 5 >= 5.1.0, PHP 7) Return current file position public int SplFileObject::ftell ( void ) Returns the position of the file pointer which represents the current offset in the file stream. Returns: Returns the position of the file pointer as an integer, or FALSE on error. Examples: SplFileObject::ftell() example <

SplFileObject::getChildren

(PHP 5 >= 5.1.0, PHP 7) No purpose public void SplFileObject::getChildren ( void ) An SplFileObject does not have children so this method returns NULL. Returns: No value is returned. See also: RecursiveIterator::getChildren() -

SplFileObject::fstat

(PHP 5 >= 5.1.0, PHP 7) Gets information about the file public array SplFileObject::fstat ( void ) Gathers the statistics of the file. Behaves identically to fstat(). Returns: Returns an array with the statistics of the file; the format of the array is described in detail on the stat() manual page. Examples: SplFileObject::fstat() e

SplFileObject::fwrite

(PHP 5 >= 5.1.0, PHP 7) Write to file public int SplFileObject::fwrite ( string $str [, int $length ] ) Writes the contents of string to the file Parameters: str The string to be written to the file. length If the length argument is given, writing will stop after length bytes have been written or the end of string is reached, whichev