Re: Array Keys

From: Date: Thu, 06 Nov 2003 07:58:02 +0000
Subject: Re: Array Keys
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-5283@lists.php.net to get a copy of this message
At 08:01 PM 11/5/2003 -0500, LingWitt@insightbb.com wrote:
I noticed that echo $object statements in PHP 5 display object ids that are kept by the engine, so this data is already in the string form and it is data that exists. As for as a use for this feature, one can't easily say there is not a use; there have been times when I wished to have this feature --though I usually found some other way to do it, but this idea is intuitive.
I didn't say there's no use but I think it's limited and can be implemented by typing adding ->key(). As mentioned in the past, the id's of objects aren't unique. They are only unique in their object group, and thus, shouldn't be used as keys. And frankly, I prefer not to expose internals to the PHP developer. Andi

« previous php.internals (#5283) next »