PHP 4.0 Bug #5540: Simple test on a string fails

From: Date: Wed, 12 Jul 2000 23:23:22 +0000
Subject: PHP 4.0 Bug #5540: Simple test on a string fails
Groups: php.dev 
Request: Send a blank email to php-dev+get-24243@lists.php.net to get a copy of this message
From: alain@onesite.org 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

« previous php.dev (#24243) next »