note 114515 added to function.is-file
| From: | Anonymous | Date: | Sun, 02 Mar 2014 21:13:55 +0000 |
| Subject: | note 114515 added to function.is-file | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-198764@lists.php.net to get a copy of this message | ||
Please be aware wildcards do not work as one might expect.
<?php
$file = '*.*';
if ( is_file($file) ) {
echo( $file . ' is a regular file' );
} else {
echo( $file . ' is not a regular file' );
}
?>
The above snippet suggests that *.* is a regular file. It does not sound regular to me. I would
expect is_file() to return FALSE.
----
Server IP: 64.71.164.2
Probable Submitter: 2602:306:cc9b:9670:9c23:654c:3561:5f5d
----
Manual Page -- http://php.net/manual/en/function.is-file.php
Edit -- https://master.php.net/note/edit/114515
Del: integrated -- https://master.php.net/note/delete/114515/integrated
Del: useless -- https://master.php.net/note/delete/114515/useless
Del: bad code -- https://master.php.net/note/delete/114515/bad+code
Del: spam -- https://master.php.net/note/delete/114515/spam
Del: non-english -- https://master.php.net/note/delete/114515/non-english
Del: in docs -- https://master.php.net/note/delete/114515/in+docs
Del: other reasons-- https://master.php.net/note/delete/114515
Reject -- https://master.php.net/note/reject/114515
Search -- https://master.php.net/manage/user-notes.php