note 70208 added to function.array-unique

From: Date: Fri, 06 Oct 2006 18:01:04 +0000
Subject: note 70208 added to function.array-unique
Groups: php.notes 
Request: Send a blank email to php-notes+get-118142@lists.php.net to get a copy of this message
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. ---- Server IP: 193.27.201.10 (proxied: 193.27.201.10 1.0 www1.shellkonto.se:3128 (squid/2.5.STABLE4)) Probable Submitter: 80.217.189.168 ---- Manual Page -- http://www.php.net/manual/en/function.array-unique.php Edit -- https://master.php.net/note/edit/70208 Del: integrated -- https://master.php.net/note/delete/70208/integrated Del: useless -- https://master.php.net/note/delete/70208/useless Del: bad code -- https://master.php.net/note/delete/70208/bad+code Del: spam -- https://master.php.net/note/delete/70208/spam Del: non-english -- https://master.php.net/note/delete/70208/non-english Del: in docs -- https://master.php.net/note/delete/70208/in+docs Del: other reasons-- https://master.php.net/note/delete/70208 Reject -- https://master.php.net/note/reject/70208 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#118142) next »