#45505 [Opn->Bgs]: DirectoryIterator default sorting error
| From: | johannes@php.net | Date: | Mon, 14 Jul 2008 09:52:25 +0000 |
| Subject: | #45505 [Opn->Bgs]: DirectoryIterator default sorting error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-126655@lists.php.net to get a copy of this message | ||
ID: 45505
Updated by: johannes@php.net
Reported By: jcknight at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: SPL related
Operating System: Linux
PHP Version: 5.2.6
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
There is no sorting guaranteed and the files are returned in the order
the operating system provides.
Previous Comments:
------------------------------------------------------------------------
[2008-07-13 23:25:25] jcknight at gmail dot com
Description:
------------
The DirectoryIterator class does not iterate the directory how it is
organized on the file system.
Reproduce code:
---------------
<?php
$dir = new DirectoryIterator(".");
foreach($dir as $file) {
echo $file->current() ."\n";
}
?>
Expected result:
----------------
.
..
enter_L.gif
enter_R.gif
mad_L.gif
mad_R.gif
Actual result:
--------------
.
..
enter_L.gif
mad_L.gif
enter_R.gif
mad_R.gif
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=45505&edit=1