Added note about the order of the function parameters. Docs could be miss-interpreted if, this note tries to reinforce expected behaviour and use

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@333318 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Mike Griffiths 2014-04-15 09:31:47 +00:00
parent 9905374cd0
commit 7f70616b6a

View file

@ -149,6 +149,23 @@ Array
<literal>array_diff_assoc($array1[0], $array2[0]);</literal>.
</simpara>
</note>
<note>
<simpara>
Ensure you pass arguments in the correct order when comparing similar
arrays with more keys. The new array should be the first in the list,
for example,
<programlisting role="php">
<![CDATA[
<?php
$array1 = array('a' => 'blue', 'b' => 'green', 'c' => 'yellow');
$array2 = array('a' => 'blue', 'b' => 'green');
$result = array_diff_assoc($array1, $array2);
print_r($result);
?>
]]>
</programlisting>
</simpara>
</note>
</refsect1>
<refsect1 role="seealso">