|
Posted by R. Rajesh Jeba Anbiah on 12/05/05 06:10
Berimor wrote:
> Hi,
> i've been always used the in_array() function to check availabylity of a
> value in array. Until today. Simple code: (do not run it tho :) )
<snip>
> It prints the time script worked. Guess the number?
> 250(!!!!) seconds!!!
> Is there any alternative in PHP to check array?
IIRC, Ilia Alshanetsky, one of the PHP core developer and maintainer
blogged on this some time ago. According to him, isset() will be the
fastest; but for isset(), you need key.
FWIW, it's nice to see many people have now become optimization
advocates recently in c.l.php--a very rarest gesture some years ago:)
--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/
[Back to original message]
|