note 94202 deleted from function.glob by danbrown
| From: | danbrown@php.net | Date: | Thu, 22 Oct 2009 13:16:32 +0000 |
| Subject: | note 94202 deleted from function.glob by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-161978@lists.php.net to get a copy of this message | ||
Note Submitter: Julie Pelletier
----
Previously shown example "<?php
$files=glob('*.txt')?glob('*.txt'):array(); ?>" is a bad recommendation
because it does the glob() twice for nothing.
You could simply use "<?php $files=glob('*.txt')?$files:array(); ?>"
instead.