Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:23899 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37726 invoked by uid 1010); 4 Jun 2006 01:12:43 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 37710 invoked from network); 4 Jun 2006 01:12:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Jun 2006 01:12:43 -0000 X-PHP-List-Original-Sender: andi@zend.com X-Host-Fingerprint: 80.74.107.235 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from ([80.74.107.235:32471] helo=mail.zend.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id C2/B4-49656-A8332844 for ; Sat, 03 Jun 2006 21:12:43 -0400 Received: (qmail 27911 invoked from network); 4 Jun 2006 01:12:14 -0000 Received: from localhost (HELO ANDI-NOTEBOOK.zend.com) (127.0.0.1) by localhost with SMTP; 4 Jun 2006 01:12:14 -0000 Message-ID: <7.0.1.0.2.20060603181129.0396fc18@zend.com> X-Mailer: QUALCOMM Windows Eudora Version 7.0.1.0 Date: Sat, 03 Jun 2006 18:12:33 -0700 To: pierre.php@gmail.com Cc: internals@lists.php.net In-Reply-To: <20060604030100.1093d2f9@pierre-u64> References: <795156743.20060603134212@marcus-boerger.de> <20060603143639.GF5355@desario.homelinux.net> <509342741.20060603183859@marcus-boerger.de> <7.0.1.0.2.20060603175211.02208a50@zend.com> <20060604030100.1093d2f9@pierre-u64> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] Missing __toString() part From: andi@zend.com (Andi Gutmans) 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 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