note 37520 rejected from function.array-diff by vincent
| From: | vincent@php.net | Date: | Tue, 18 Nov 2003 18:46:30 +0000 |
| Subject: | note 37520 rejected from function.array-diff by vincent | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-60580@lists.php.net to get a copy of this message | ||
Note Submitter: bbyrne@mediareform.net
----
The manual makes two statements regarding this function, and one of them is incorrect.
<B>array_diff -- Computes the difference of arrays</B>
That's true. The function returns an array containing all the elements that do not appear in
the arrays used as arguments.
<B>array_diff() returns an array containing all the values of array1 that are not present
in any of the other arguments.</B>
This is *not true.* array_diff returns an array containing all the values OF ALL THE ARRAYS that are
not present inany of the other arguments.
At least, that's how 4.3.2 is behaving on my machine right now. I tried supplying array3 as the
same as array2, to weed out the values in array2 I didn't want the function returning, but to
no avail.