note 70203 rejected from function.array-unique by bobby
| From: | bobby@php.net | Date: | Fri, 06 Oct 2006 18:10:06 +0000 |
| Subject: | note 70203 rejected from function.array-unique by bobby | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-118146@lists.php.net to get a copy of this message | ||
Note Submitter: jamesp at westcoastaerospace dot com
----
The documentation fails to say that array_unique() should not be expected to work on arrays of
objects.
Furthermore, the behavior of array_unique on an array of objects is different from php4 to php5. As
far as I can tell, using array_unique($array_of_objects) will return only the first object of each
type in php4. But using array_unique($array_of_objects) in php5 will return the original array.
(correct me if I am wrong on any of this)