Re: Missing __toString() part

From: Date: Sun, 04 Jun 2006 01:12:33 +0000
Subject: Re: Missing __toString() part
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-23899@lists.php.net to get a copy of this message
Yep that is also a choice, although it can be advantageous to have an automatic (a) which people just now works, always... I don't think it's a critical problem because as you pointed out people can deal with it, but I think it'd be nice to provide some tools to make life easier. At 06:01 PM 6/3/2006, Pierre wrote:
Hi, On 6/4/06, Andi Gutmans <andi@zend.com> wrote: Generally I think it's a good thing to allow to use objects as array indexes. There are really two ways of doing it: a) Try and find a way to create unique ideas. b) Support __toString() and leave it up to the author. I see a third choice, which I prefer: c) leave the choice to the user, he knows better what to do with his object (like implementing his own get(Hash|Key) method. --Pierre


« previous php.internals (#23899) next »