Bug #13567 Updated: array_search does not return FALSE as documented, if no entry was found
| From: | jeroen@php.net | Date: | Fri, 05 Oct 2001 20:05:26 +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-67373@lists.php.net to get a copy of this message | ||
ID: 13567
Updated by: jeroen
Reported By: alvarez@st-oneline.net
Old Status: Open
Status: Assigned
Bug Type: Arrays related
Operating System: Linux 2.2.19
PHP Version: 4.0.5
Old Assigned To:
Assigned To: jeroen
New Comment:
Use var_dump to check what's actually returned.
NULL is returned, confirmed with latest CVS.
Assigning to myself
Previous Comments:
------------------------------------------------------------------------
[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