note 111025 added to function.array-diff
| From: | DimitarBoyadzhiev | Date: | Tue, 08 Jan 2013 09:40:20 +0000 |
| Subject: | note 111025 added to function.array-diff | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-192829@lists.php.net to get a copy of this message | ||
You should consider that if the first array is empty then the result is empty, which is not becoming
clear at first if you read the return value description:
"Returns an array containing all the entries from array1 that are not present in any of the
other arrays."
Consider checking if array1 is empty before using this function.
----
Server IP: 69.147.83.199
Probable Submitter: 93.152.158.160
----
Manual Page -- http://php.net/manual/en/function.array-diff.php
Edit -- https://master.php.net/note/edit/111025
Del: integrated -- https://master.php.net/note/delete/111025/integrated
Del: useless -- https://master.php.net/note/delete/111025/useless
Del: bad code -- https://master.php.net/note/delete/111025/bad+code
Del: spam -- https://master.php.net/note/delete/111025/spam
Del: non-english -- https://master.php.net/note/delete/111025/non-english
Del: in docs -- https://master.php.net/note/delete/111025/in+docs
Del: other reasons-- https://master.php.net/note/delete/111025
Reject -- https://master.php.net/note/reject/111025
Search -- https://master.php.net/manage/user-notes.php