|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-05-02 23:07 UTC] johannes@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 21:00:01 2025 UTC |
Description: ------------ The dir class method read works if using it just the way it is stated in the documentation, however, if I re-write it to use TRUE=== it fails. See code example: Reproduce code: --------------- Original Code Snippet: <?php $d = dir("/etc/php5"); echo "Handle: " . $d->handle . "\n"; echo "Path: " . $d->path . "\n"; while (false !== ($entry = $d->read())) { echo $entry."\n"; } $d->close(); ?> MODIFIED: while (false !== ($entry = $d->read())) { TO: while (true === ($entry = $d->read())) { Expected result: ---------------- Expected the alternative version to return true, but it did not. Actual result: -------------- Code returned false.