|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-10-18 01:57 UTC] cynic@php.net
am I the only one who thinks that this should not output anything? <?php $fd = fopen(__FILE__, 'r'); while (!feof($fd)) fgets($fd, 4096) || var_dump(feof($fd)); fclose($fd); I get bool(false) from 4.4.0-dev (cli) and 4.2.2 mod_php. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 07:00:01 2025 UTC |
Yes, cynic, you're right, it's a bug. $fd = fopen(__FILE__, 'r'); while (!feof($fd)) { $s = fgets($fd); if($s === false) echo "There was an error! And feof() is ",var_dump(feof($fd)); // echo $s; } fclose($fd); Prints: There was an error! And feof() is bool(true)