note 112916 added to function.array-diff
| From: | Anonymous | Date: | Tue, 06 Aug 2013 13:56:19 +0000 |
| Subject: | note 112916 added to function.array-diff | ||
| Groups: | php.notes php.notes | ||
| Request: | Send a blank email to php-notes+get-195891@lists.php.net to get a copy of this message | ||
Please note that array_diff cannot compare with an undefined array. For example:
<?php
$array1 = array ("ABC", "DEF");
$Result = $array_diff( $array1, $array2);
var_dump($Result);
?>
will output NULL NULL. If your script causes an undefined array (like mine did) it can be hard to
find the mistake.
Greetings
----
Server IP: 87.106.1.137
Probable Submitter: 83.243.48.3
----
Manual Page -- http://php.net/manual/en/function.array-diff.php
Edit -- https://master.php.net/note/edit/112916
Del: integrated -- https://master.php.net/note/delete/112916/integrated
Del: useless -- https://master.php.net/note/delete/112916/useless
Del: bad code -- https://master.php.net/note/delete/112916/bad+code
Del: spam -- https://master.php.net/note/delete/112916/spam
Del: non-english -- https://master.php.net/note/delete/112916/non-english
Del: in docs -- https://master.php.net/note/delete/112916/in+docs
Del: other reasons-- https://master.php.net/note/delete/112916
Reject -- https://master.php.net/note/reject/112916
Search -- https://master.php.net/manage/user-notes.php