php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6259 misbehaving/badly documented "fgetc($fp)" after EOF
Submitted: 2000-08-20 09:01 UTC Modified: 2000-08-20 09:29 UTC
From: alex at zend dot com Assigned:
Status: Closed Package: Other
PHP Version: 4.0.1pl2 OS: linux-glibc21
Private report: No CVE-ID: None
 [2000-08-20 09:01 UTC] alex at zend dot com
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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-20 09:29 UTC] stas@php.net
Fixed in CVS, thanks.
 
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sun Feb 05 02:05:48 2023 UTC