Search Results
SplFileObject::eof (PHP 5 >= 5.1.0, PHP 7, PHP 8) SplFileObject::eof — Reached end of file
Jul 11, 2025 · The SplFileObject::eof () function is an inbuilt function of Standard PHP Library (SPL) in PHP which is used reached end of file. Syntax: string SplFileObject::eof( void ) Parameters: This function does not accept any parameter. Return values: Returns TRUE on Success. Below Programs illustrate the SplFileObject::eof () function in PHP. Note: Program 1 has used gfg.txt file that contains ...
Table of Contents SplFileObject::__construct — Construct a new file object. SplFileObject::current — Retrieve current line of file SplFileObject::eof — Reached end of file SplFileObject::fflush — Flushes the output to the file SplFileObject::fgetc — Gets character from file SplFileObject::fgetcsv — Gets line from file and parse as CSV fields SplFileObject::fgets — Gets line from ...
Return Values Returns true if file is at EOF, false otherwise.
2 days ago · SplFileObject::setCsvControl — Set the delimiter, enclosure and escape character for CSV SplFileObject::setFlags — Sets flags for the SplFileObject SplFileObject::setMaxLineLen — Set maximum line length SplFileObject::__toString — Returns the current line as a string SplFileObject::valid — Not at EOF
The SplFileObject class Introduction (PHP 5 >= 5.1.0, PHP 7) The SplFileObject class offers an object oriented interface for a file. Class synopsis
See Also SplFileObject::valid () - Not at EOF feof () - Tests for end-of-file on a file pointer
