Bug #10492: fgetc return value (FALSE=EOF ... maybe)

From: Date: Wed, 25 Apr 2001 15:09:28 +0000
Subject: Bug #10492: fgetc return value (FALSE=EOF ... maybe)
Groups: php.dev 
Request: Send a blank email to php-dev+get-52388@lists.php.net to get a copy of this message
From: eheckers@users.sourceforge.net Operating system: Linux PHP version: 4.0.4pl1 PHP Bug Type: Documentation problem Bug description: fgetc return value (FALSE=EOF ... maybe) 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. -- Edit Bug report at: http://bugs.php.net/?id=10492&edit=1

« previous php.dev (#52388) next »