Re: Object ID

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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...

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux