Re: New function: spl_object_id() or spl_object_handle()

From: Date: Fri, 28 Nov 2014 21:06:21 +0000
Subject: Re: New function: spl_object_id() or spl_object_handle()
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-79296@lists.php.net to get a copy of this message
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.

« previous php.internals (#79296) next »