Re: strange empty array behavior being at in_array()

From: Date: Mon, 24 Dec 2001 12:09:09 +0000
Subject: Re: strange empty array behavior being at in_array()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-78650@lists.php.net to get a copy of this message
Try in_array('pattern',array('')) and in_array(1,array(0)). The quirk you found is predictable, as we know how PHP behaves when converting strings to integer values... And 'pattern' evaluates to 0 -- '55pattern' for example doesn't match -- but then again, what kinda word is that? :-) HTH Bogdan Peter Vereshagin wrote: > I think that would not be PHP error. But what's the thing I > misunderstood?

« previous php.general (#78650) next »