|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15621 directory with name '0' isn't listed
Submitted: 2002-02-19 09:10 UTC Modified: 2002-02-19 09:22 UTC
From: chocobot at gmx dot de Assigned:
Status: Not a bug Package: Directory function related
PHP Version: 4.1.1 OS: Linux Redhat
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: chocobot at gmx dot de
New email:
PHP Version: OS:


 [2002-02-19 09:10 UTC] chocobot at gmx dot de
i have a directory containing other directories, including one named '0'.
I try to use "while ($file = readdir($handle))" to go throug all entries, but none get listed! 
As soon as i rename that dir to something else, it works as expected.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-02-19 09:22 UTC]
This is not a bug. Please double-check the documentation available
at and the instructions on how to report
a bug at

You should use
while (false !== ($file = readdir ($handle)))

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 05:01:28 2024 UTC