ID:               49657
 Updated by:       [email protected]
 Reported By:      pvenakis at efrontlearning dot net
-Status:           Open
+Status:           Bogus
 Bug Type:         Unknown/Other Function
 Operating System: windows
 PHP Version:      5.3.0
 New Comment:

That's expected. Returning NULL on invalid argument(s) is correct.


Previous Comments:
------------------------------------------------------------------------

[2009-09-24 12:03:47] pvenakis at efrontlearning dot net

Description:
------------
array_search returns false in 5.2.x, null in 5.3.0, when $haystack is
not an array


Reproduce code:
---------------
$haystack = false; //Anything not an array
$result = array_search(1, $haystack);
var_dump($result);


Expected result:
----------------
bool(false)

Actual result:
--------------
null


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=49657&edit=1

Reply via email to