feof

Author Topic: feof  (Read 1463 times)

Offline chinmay.sahooTopic starter

  • Trade Count: (0)
  • Full Member
  • ***
  • Thank You 2
  • Posts: 159
  • Karma: 0
    • Hot Shaper
feof
« on: 12-24-2015, 00:43:06 »
The feof function tests for end-of-file on a file pointer and takes a filename as argument. It’s used mostly in a while loop to perform the same function on each line in a file:

Quote
while (!feof($fd)) {
$line = fgets($fd, 4096);
echo $line;
}


Offline TomClarke

  • Trade Count: (0)
  • Hero Member
  • *****
  • Thank You 18
  • Posts: 898
  • Karma: 0
  • Gender: Male
    • Custom Writing Service & Content Marketplace
Re: feof
« Reply #1 on: 05-14-2016, 02:03:45 »
 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.
Your ideas, our writings - Writology.com