ID: 32916 Updated by: [EMAIL PROTECTED] Reported By: laidbak6921 at yahoo dot com -Status: Open +Status: Bogus Bug Type: Directory function related Operating System: FreeBSD 4.7 PHP Version: 4.3.10 New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php dir::read() returns a string with a filename, no bool. Previous Comments: ------------------------------------------------------------------------ [2005-05-02 21:37:58] laidbak6921 at yahoo dot com 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. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=32916&edit=1
