Re: [PHP] Object ID
- From: eli.hen@xxxxxxxxx (Eli)
- Date: Thu, 15 Feb 2007 02:15:40 +0200
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...
- References:
- Object ID
- From: Eli
- Re: [PHP] Object ID
- From: "Richard Lynch"
- Re: [PHP] Object ID
- From: Eli
- Object ID
- Prev by Date: Re: [PHP] Object ID
- Next by Date: Re: [PHP] Getting mysql_query results into an array
- Previous by thread: Re: [PHP] Object ID
- Next by thread: Retrieve value of newly inserted row.
- Index(es):
Relevant Pages
|