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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: alex at zend dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-20 09:29 UTC] stas@php.net
Fixed in CVS, thanks.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 10 02:01:26 2024 UTC