Bug #13567 Updated: array_search does not return FALSE as documented, if no entry was found

From: Date: Fri, 05 Oct 2001 20:14:59 +0000
Subject: Bug #13567 Updated: array_search does not return FALSE as documented, if no entry was found
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-67375@lists.php.net to get a copy of this message
ID: 13567 Updated by: jeroen Reported By: alvarez@st-oneline.net Old Status: Assigned Status: Closed Bug Type: Arrays related Operating System: Linux 2.2.19 PHP Version: 4.0.5 Assigned To: jeroen New Comment: Fixed in CVS, will be in 4.0.8, and maybe in 4.0.7 (what's the policy on this kind of bugfixes?) Previous Comments: ------------------------------------------------------------------------ [2001-10-05 16:05:26] jeroen@php.net Use var_dump to check what's actually returned. NULL is returned, confirmed with latest CVS. Assigning to myself ------------------------------------------------------------------------ [2001-10-05 14:50:57] alvarez@st-oneline.net script to reproduce the error quickly: // won't produce output, is not boolean FALSE if (array_search ('a', array ('b')) === FALSE) echo 'is boolean FALSE'; // won't produce output, is not of type boolean if (is_bool (array_search ('a', array ('b')))) echo 'is boolean'; ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=13567&edit=1

« previous php.dev (#67375) next »