PHP 4.0 Bug #6259: misbehaving/badly documented "fgetc($fp)" after EOF
| From: | alex at zend dot com | Date: | Sun, 20 Aug 2000 13:01:13 +0000 |
| Subject: | PHP 4.0 Bug #6259: misbehaving/badly documented "fgetc($fp)" after EOF | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-29905@lists.php.net to get a copy of this message | ||
From: alex@zend.com
Operating system: linux-glibc21
PHP version: 4.0.1pl2
PHP Bug Type: Other
Bug description: misbehaving/badly documented "fgetc($fp)" after EOF
from the PHP manual: " string fgetc (int fp) - Returns a string containing a single character
read from the file pointed to by fp. Returns FALSE on EOF (as does feof()).".
After an attempt to retreive char after the EOF fgetc returns 255 on my system. Either the function
or the documentation should be corrected. This value 255 is what the clib returns but it does not
make sense in PHP.