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
This commit is contained in:
Philip Olson 2002-03-27 23:55:32 +00:00
parent 95f7c8ac97
commit 5deda14dd8

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.168 $ -->
<!-- $Revision: 1.169 $ -->
<reference id="ref.array">
<title>Array Functions</title>
<titleabbrev>Arrays</titleabbrev>
@ -2954,6 +2954,12 @@ if (in_array('o', $a))
<parameter>needle</parameter> and returns the key if it is found in
the array, &false; otherwise.
</para>
<note>
<para>
Prior to PHP 4.2.0, <function>array_search</function> returns
<constant>NULL</constant> on failure instead of &false;.
</para>
</note>
<para>
If the optional third parameter <parameter>strict</parameter> is set to
&true; then the <function>array_search</function>
@ -2962,7 +2968,7 @@ if (in_array('o', $a))
</para>
&return.falseproblem;
<para>
See also <function>in_array</function>.
See also <function>array_keys</function> and <function>in_array</function>.
</para>
</refsect1>
</refentry>