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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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: Mon Dec 02 16:01:33 2024 UTC