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 Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or 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

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: Wed Feb 08 10:03:53 2023 UTC