Re: Missing __toString() part
| From: | Andi Gutmans | Date: | Sun, 04 Jun 2006 15:14:46 +0000 |
| Subject: | Re: Missing __toString() part | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-23929@lists.php.net to get a copy of this message | ||
At 08:08 AM 6/4/2006, Marcus Boerger wrote:
Hello Andi, it was your own argument that the id itself is not unique when some time ago somebody wanted to have access to that id from userland. And it is also the reason for SplObjectStorage the way it is today.The object id itself is not unique, but coupled with the class name it is. All this means is that the unique id has to be a string and not a number. I mentioned in the past that it'd be a problem to have a number as the unique id.
By 'it hash' nothing to do with hash' i mean that the classname does not belong into a hash.My point is that the string "ClassName#id" is what would be the unique identifier. e.g. that's what toKey() would return (assuming we'd want such a method). Andi