public function isEndOfFile()
    {
        $handle = $this->getHandle();

        if (false === @fgetc($handle)) {

            return feof($handle);
        } else {
            fseek($handle, -1, SEEK_CUR);
        }

        return false;
    }
public function isEndOfFile()
    {
        $handle = $this->getHandle();

        if (false === @fgetc($handle)) {

            return feof($handle);
        } else {
            fseek($handle, -1, SEEK_CUR);
        }

        return false;
    }
public function isEndOfFile ( ) { $ handle = $ this -> getHandle ( ) ; if ( false === @ fgetc ( $ handle ) ) { return feof ( $ handle ) ; } else { fseek ( $ handle , - 1 , SEEK_CUR ) ; } return false ; }
Checks if the end of the file has been reached.

Before `feof()` is called, an attempt is made to reach a single byte
from the file. If the read fails, then the `feof()` is made to actually
determine the if the end of the file has been reached. If the EOF is not
reached, the file handle will be seeked back the one byte that was read.

while (!$reader->isEndOfFile()) {
// not at the end yet
}

@return boolean If the end of the file has been reached, `true` is
returned. If the end of the file has not been reached,
`false` is returned.

@api
Checks if the end of the file has been reached .