note 97398 deleted from function.glob by danbrown
| From: | danbrown@php.net | Date: | Sun, 18 Apr 2010 02:41:36 +0000 |
| Subject: | note 97398 deleted from function.glob by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-168361@lists.php.net to get a copy of this message | ||
Note Submitter: Anonymous
----
With respect, tailinchu's approach is a very ineffiicient and potentially costly approach to
handling the issue of glob returning false. Instead, try:
if(is_array($files = glob('*.txt'))){
// You have matches, and you didn't glob twice
...
...
}
Cheers,
MB