Re: Array Keys

From: Date: Thu, 06 Nov 2003 01:01:10 +0000
Subject: Re: Array Keys
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-5277@lists.php.net to get a copy of this message
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.
Andi Gutmans <andi@zend.com> I don't think it's a good idea because it would break lots of other things such as foreach(). keys have to be integers or strings.
On 5 Nov 2003, at 2:08 AM, netcat wrote:
Yes, nice and generally it's nice to have a language that it's possible to use anything as index but what use do you see for it ? Hash with objects as indexes ..... will hold additional data for objects? So why not store the data inside the object itself ?


« previous php.internals (#5277) next »