Re: Missing __toString() part
| From: | Marcus Boerger | Date: | Sun, 04 Jun 2006 15:08:29 +0000 |
| Subject: | Re: Missing __toString() part | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-23928@lists.php.net to get a copy of this message | ||
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.
By 'it hash' nothing to do with hash' i mean that the classname does
not belong into a hash.
best regards
marcus
Sunday, June 4, 2006, 4:58:34 PM, you wrote:
> What extensions today have different objects with the same object ids
> (inside a certain class)?
> What do you mean it has nothing to do with hash? Don't understand
> what you mean.
> At 07:56 AM 6/4/2006, Marcus Boerger wrote:
>>Hello Andi,
>>
>> the classname has not make the id unique. In fact it has nothing to
>>do with a hash.
>>
>>best regards
>>marcus
>>
>>Sunday, June 4, 2006, 4:26:13 PM, you wrote:
>>
>> > I would suggest :
>> > a) Make sure $arr[(string)$obj] works (I see no reason for it not to).
>> > b) Look into how to support a unique identifier (-1 on a hash value).
>> > Two main questions are how this thing looks like, and whether it's
>> > explicit (you need to call some function/method to get it) or
>> > implicit (e.g. $arr[$obj]).
>>
>> > A Unique indentifier could look something like "Classname#Object id"
>> > e.g. "SimpleXMLElement#1".
>>
>> > Andi
>>
>> > P.S.-Yep, sticking to bullets keeps emails brief :)
>>
>>
>>
>>
>>Best regards,
>> Marcus
Best regards,
Marcus