From 5deda14dd80c9ba9b8153c738432ae18629d70b2 Mon Sep 17 00:00:00 2001 From: Philip Olson Date: Wed, 27 Mar 2002 23:55:32 +0000 Subject: [PATCH] array_search: Returns NULL on failure prior to 4.2.0 See also array_keys git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@75531 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/array.xml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/functions/array.xml b/functions/array.xml index 66ad248d3b..c3e7d110d5 100644 --- a/functions/array.xml +++ b/functions/array.xml @@ -1,5 +1,5 @@ - + Array Functions Arrays @@ -2954,6 +2954,12 @@ if (in_array('o', $a)) needle and returns the key if it is found in the array, &false; otherwise. + + + Prior to PHP 4.2.0, array_search returns + NULL on failure instead of &false;. + + If the optional third parameter strict is set to &true; then the array_search @@ -2962,7 +2968,7 @@ if (in_array('o', $a)) &return.falseproblem; - See also in_array. + See also array_keys and in_array.