|  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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
49 + 49 = ?
Subscribe to this entry?

 [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: Thu Apr 18 08:02:42 2024 UTC