Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79296 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93435 invoked from network); 28 Nov 2014 21:06:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Nov 2014 21:06:26 -0000 Authentication-Results: pb1.pair.com header.from=dev@mabe.berlin; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=dev@mabe.berlin; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain mabe.berlin from 80.237.132.167 cause and error) X-PHP-List-Original-Sender: dev@mabe.berlin X-Host-Fingerprint: 80.237.132.167 wp160.webpack.hosteurope.de Received: from [80.237.132.167] ([80.237.132.167:36606] helo=wp160.webpack.hosteurope.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4B/35-59154-1D3E8745 for ; Fri, 28 Nov 2014 16:06:25 -0500 Received: from dslb-178-000-146-220.178.000.pools.vodafone-ip.de ([178.0.146.220] helo=[192.168.178.30]); authenticated by wp160.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) id 1XuSk9-00011L-UI; Fri, 28 Nov 2014 22:06:21 +0100 Message-ID: <5478E3CD.7030803@mabe.berlin> Date: Fri, 28 Nov 2014 22:06:21 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-bounce-key: webpack.hosteurope.de;dev@mabe.berlin;1417208785;d5dd0126; Subject: Re: [PHP-DEV] New function: spl_object_id() or spl_object_handle() From: dev@mabe.berlin (Marc Bennewitz) Am 28.11.2014 um 21:21 schrieb Levi Morrison: >>> Won't `$obj1 === $obj2` work for you ? >>> >> This works if you have two objects which are easily accessible in the same >> scope. >> >> Not that it can not be done this way, but it may require jumping through >> hoops to get two object references into the common scope where you can >> compare them. > If you can get their hashes to the same place, you can get the object > to the same place. > > Big -1 from me. > This given example sounds wired to me, too. But to have a unique ID for objects sound like a very good idea and would solve the object as array key issue. I'm sure it's not as simple as the function prototype explained in this thread previously.