|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5693 is_dir, is_file and filetype do not work
Submitted: 2000-07-20 13:10 UTC Modified: 2000-08-01 05:37 UTC
From: mclion at obala dot net Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 4.0.1pl2 OS: Win32/Unix
Private report: No CVE-ID: None
 [2000-07-20 13:10 UTC] mclion at obala dot net
is_dir returns dir only for "." and ".." directories in a tree, is_file returns true even for directories and filetype returns void for directories.

while($file = readdir($handle)) {
if(is_dir($file)) {
     echo "dir = $file";
} else { 
     echo "file = $file";


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-21 17:55 UTC] hholzgra at cvs dot php dot net
sorry, can't reproduce on linux and solaris

are you sure it happens on Win32 _and_ UNIX ???
 [2000-08-01 05:37 UTC]
Please try the latest CVS version or snapshot ( and reopen the bug report if this still happens to you. I couldn't reproduce it, neither on Linux nor on Windows NT.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Sep 29 21:01:25 2023 UTC