Re: Object ID

From: Date: Thu, 15 Feb 2007 00:15:40 +0000
Subject: Re: Object ID
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-248893@lists.php.net to get a copy of this message
Hmm.. sorry.. just checked it now, and you're right.. The #id in the dump and the hash given by spl_object_hash() give a unique ID among the objects instantiated in your process.. If you unset some of the objects, and re-create new instances of them, you may get the SAME ids you had before.. The better is might be by giving a custom id like: $ID = md5(microtime()); Eli wrote:
Every dump of the same node will produce the same #id. Cloned object, is a separated new object which will have a different id. The spl_object_hash function produces such an id too (32 hex chars), which doesn't change if you change the object members. Richard Lynch wrote:
I suspect that's not an "absolute" ID, but just an ID for that particular dump. So it has no applicability beyond that dump...


« previous php.general (#248893) next »