ID:               35136
 Updated by:       [EMAIL PROTECTED]
 Reported By:      dsp at tdcspace dot dk
-Status:           Open
+Status:           Bogus
 Bug Type:         Filesystem function related
 Operating System: w98
 PHP Version:      4.4.1
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.




Previous Comments:
------------------------------------------------------------------------

[2005-11-07 10:38:04] dsp at tdcspace dot dk

Description:
------------
I really thought that the feof() was TRUE when the logical file pointer
is a EOF.

but no ! 
we need to do fread() and get an empty record before the feof() reports
TRUE.

sunday is the last day in a week and thus end-of-week - and so is the
last byte a the file is also EOF.

but the way feof() works - is says - it must wait until monday - before
it can find out !


Reproduce code:
---------------
// open and read binary file with 128 byte records

$h = fopen("phpbugs.dat", "rb");

while(!feof($h)) {
  $rec = fread($h, 128);
  if ($strlen($rec) == 0) break; // should not be needed
  }

close($h);



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=35136&edit=1

Reply via email to