The feof() function checks if the "end-of-file" (EOF) has been reached.
This function returns TRUE if an error occurs, or if EOF has been reached. Otherwise it returns FALSE.
bool feof ( resource $handle )
Tests for end-of-file on a file pointer.
Parameter | Description |
---|---|
file | Required. Specifies the open file to check |
If the passed file pointer is not valid you may get an infinite loop, because feof() fails to return TRUE.