note 95719 deleted from function.glob by thiago

From: Date: Mon, 18 Jan 2010 11:47:35 +0000
Subject: note 95719 deleted from function.glob by thiago
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-165071@lists.php.net to get a copy of this message
Note Submitter: mail2lx(at)gmx(dot)net ---- @tailinchu[at]gmail[dot]com This is not a good solution, because it will perform two FS operations, where only one is required. For what you want to achieve (being sure to work on an array), a typecast is much more suitable than a ternary operator: <?php $files = (array) glob('*.txt'); ?>

« previous php.notes (#165071) next »