Bug #10492 Updated: fgetc return value (FALSE=EOF ... maybe)
| From: | derick@php.net | Date: | Wed, 25 Apr 2001 15:12:13 +0000 |
| Subject: | Bug #10492 Updated: fgetc return value (FALSE=EOF ... maybe) | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-52389@lists.php.net to get a copy of this message | ||
ID: 10492
Updated by: derick
Reported By: eheckers@users.sourceforge.net
Old-Status: Open
Status: Bogus
Bug Type: Documentation problem
PHP Version: 4.0.4pl1
Assigned To:
Comments:
You need to use === FALSE in this case, to check for the type too. If this is what you are doing,
please reopen this bug report and include a short reproducing script.
Previous Comments:
---------------------------------------------------------------------------
[2001-04-25 11:09:27] eheckers@users.sourceforge.net
According to the manula fgetc returns value FALSE
if the eof is reached.
This is true but the problem is that it also returns
FALSE if a '0' is read from the file.
The return value FALSE of fgetc() should not be used to test the EOF condition.
It is better to drop that line from the documentation and
add a reference for using feof() to test for the EOF condition.
Bye,
Erik.
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10492&edit=2