Bug #2125: function dir, readdir does not list files/dirs named "0" (zero))
| From: | ivelin at iname dot com | Date: | Sun, 22 Aug 1999 23:00:30 +0000 |
| Subject: | Bug #2125: function dir, readdir does not list files/dirs named "0" (zero)) | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-10085@lists.php.net to get a copy of this message | ||
From: ivelin@iname.com
Operating system: Linux 2.2.5
PHP version: 3.0.12
PHP Bug Type: Other
Bug description: function dir, readdir does not list files/dirs named "0" (zero))
if you have 3 subdirs in the current dir, named 0, 1 and 2, only 1 and 2 would appear, but not 0
$dh = dir("./");
$i=0;
while($fname=readdir($dh)) {
if ($fname != "." & $fname != "..") {
$dirs[$i++] = $fname;
};
}
$dh->close();