#21877 [Com]: fread may read less bytes than requested even if EOF is not reached ...
| From: | gaelx at free dot fr | Date: | Tue, 28 Jan 2003 01:53:31 +0000 |
| Subject: | #21877 [Com]: fread may read less bytes than requested even if EOF is not reached ... | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969351356@lists.php.net to get a copy of this message | ||
ID: 21877
Comment by: gaelx@free.fr
Reported By: hholzgra@php.net
Status: Open
Bug Type: Documentation problem
Operating System: *
PHP Version: 4CVS-2003-01-25 (stable)
Assigned To: hholzgra
New Comment:
here was my code:
$f=fopen("./foo","r");
while($c=fgetc($f)){
...
}
...and the 'while' loop was quit long before EOF was reached.
After examination, it was quit when a character 0 was read
(thus confusion between 0 and EOF.......)
Previous Comments:
------------------------------------------------------------------------
[2003-01-25 13:07:29] hholzgra@php.net
ok, it only true for non-blocking php streams ...
but still this should be mentioned on the fread() page
------------------------------------------------------------------------
[2003-01-25 12:56:17] hholzgra@php.net
i asume this not only true for C fread() but also for PHP ?
if so -> should be documented as such ...
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=21877&edit=1