|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-07-18 15:37 UTC] jani@php.net
[2007-07-23 08:35 UTC] tony2001@php.net
[2007-07-23 11:26 UTC] jani@php.net
[2007-07-24 09:08 UTC] dmitry@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 04:00:01 2025 UTC |
Description: ------------ is_file() matches for a file name given with wild-card character/trailing slash on Windows, but not on Linux. When wild-card char/trailing slash is given in the file name as input to the function, the function returns false on Linux. In the same manner, is_dir() matches for a dir name given with wild-card character on Windows, but not on Linux. When wild-card is given in the dir name as input to the function, the function returns false on Linux. A consistent behavior of the function is expected. Environment: Operating System: RHEL 4 PHP Version: PHP 5.2 Configure Setup: ./configure Reproduce code: --------------- <?php fclose( fopen("test.tmp", "w") ); var_dump( is_file("test.tmp") ); var_dump( is_file("test.tmp/") ); var_dump( is_file("*.tmp") ); unlink("test.tmp"); mkdir("temp"); var_dump( is_dir("temp") ); var_dump( is_dir("temp/") ); var_dump( is_dir("*mp") ); rmdir("temp"); ?> Expected result: ---------------- bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) Actual result: -------------- bool(true) bool(false) bool(false) bool(true) bool(true) bool(false)