|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-09-02 04:55 UTC] rasmus@php.net
-Status: Open
+Status: Not a bug
[2013-09-02 04:55 UTC] rasmus@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 24 10:00:01 2025 UTC |
Description: ------------ If using fread and have read the last byte in the file, feof still reports have not reached end of file. Test script: --------------- <?php $fp = fopen('feof.bin', 'w'); fwrite($fp, 'abc'); fclose($fp); $fp = fopen('feof.bin', 'r'); $bytes = fread($fp, 3); echo feof($fp) ? 't' : 'f'; echo PHP_EOL; fclose($fp); unlink('feof.bin'); Expected result: ---------------- Expected feof to return true Actual result: -------------- feof returned false.