From:             intro at intro dot one dot pl
Operating system: linux
PHP version:      5.0.3
PHP Bug Type:     Unknown/Other Function
Bug description:  is_dir function

Description:
------------
For example i have 4 folders in /home directory on unix platform (a,b,c,d)
and php5. The script:
I have strange thing that function is_dir not always shows every dirs as
it is dir. In my example script is_dir returned only "c" as dir and the
rest (a,b,d) as file.

Reproduce code:
---------------
<?php
$files=scandir("/home");
foreach ($files as $file)
{
        if (is_dir($file))
        {
                echo "dir: $file";
        }
}
?>

Expected result:
----------------
dir: a dir: b dir: c dir: d

Actual result:
--------------
dir: c

-- 
Edit bug report at http://bugs.php.net/?id=31377&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=31377&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=31377&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=31377&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=31377&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=31377&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=31377&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=31377&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=31377&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=31377&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=31377&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=31377&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=31377&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=31377&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=31377&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=31377&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=31377&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=31377&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=31377&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=31377&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=31377&r=mysqlcfg

Reply via email to