note 70208 deleted from function.array-unique by bobby
| From: | bobby@php.net | Date: | Fri, 06 Oct 2006 18:09:19 +0000 |
| Subject: | note 70208 deleted from function.array-unique by bobby | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-118145@lists.php.net to get a copy of this message | ||
Note Submitter:
----
jamesp at westcoastaerospace dot com:
<?php
echo count(array_unique(array(new stdClass(), new stdClass())));
?>
This will echo 2. Sure, because these are two different objects!
<?php
$x = new stdClass();
echo count(array_unique(array($x, $x)));
?>
This will echo 1.
Hope that clears things up, as in, they made array_unqiue() more proper if anything.