[PHP-DEV] PHP 4.0 Bug #5540: Simple test on a string fails From: alain <email protected>
Date: 07/12/00

From: alain <email protected>
Operating system: Linux RedHat 5.2 2.0.36
PHP version: 4.0.1pl2
PHP Bug Type: Scripting Engine problem
Bug description: Simple test on a string fails

This works (copied from the manual) :

<?php
    $handle=opendir('.');
    echo "Directory handle: $handle\n";
    echo "Files:\n";
    while ($file = readdir($handle)) {
        echo "$file\n";
    }
    closedir($handle);
?>

This doesn't work :

<?php
    $handle=opendir('.');
    echo "Directory handle: $handle\n";
    echo "Files:\n";
    while ($file = readdir($handle)) {
/* just added this test : */
if ($file!=".")
{
        echo "$file\n";
}
    }
    closedir($handle);
?>

Live example :

http://www.onesite.org/testphp/ok.php3
http://www.onesite.org/testphp/ko.php3
http://www.onesite.org/testphp/ok.php3.txt
http://www.onesite.org/testphp/ko.php3.txt

Live phpinfo: http://www.onesite.org/phpinfo.php3
php.ini : http://www.onesite.org/php.ini

PHP installed from the tarball, running as a
cgi through a shellscript.
Fails from the command line too
The same scripts work fine with php 3.0.12

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>