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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
35 + 15 = ?
Subscribe to this entry?

 
 [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-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 11:01:29 2024 UTC