Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:23945 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 72892 invoked by uid 1010); 4 Jun 2006 23:28:12 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 72877 invoked from network); 4 Jun 2006 23:28:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Jun 2006 23:28:12 -0000 X-PHP-List-Original-Sender: andrei@gravitonic.com X-Host-Fingerprint: 204.11.219.139 lerdorf.com Linux 2.5 (sometimes 2.4) (4) Received: from ([204.11.219.139:36760] helo=lerdorf.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 13/20-00946-C8C63844 for ; Sun, 04 Jun 2006 19:28:12 -0400 Received: from [192.168.11.3] (c-24-6-96-18.hsd1.ca.comcast.net [24.6.96.18]) (authenticated bits=0) by lerdorf.com (8.13.6/8.13.6/Debian-1) with ESMTP id k54NS2cq014534; Sun, 4 Jun 2006 16:28:04 -0700 In-Reply-To: <795156743.20060603134212@marcus-boerger.de> References: <795156743.20060603134212@marcus-boerger.de> Mime-Version: 1.0 (Apple Message framework v750) X-Priority: 3 (Normal) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-ID: <754ED3FF-418F-4E7F-A7A8-B1C0A1B59AFB@gravitonic.com> Cc: PHP Internals , Dmitry Stogov , Andi Gutmans , Zeev Suraski , Ilia Alshanetsky Content-Transfer-Encoding: 7bit Date: Sun, 4 Jun 2006 16:28:01 -0700 To: Marcus Boerger X-Mailer: Apple Mail (2.750) Subject: Re: [PHP-DEV] Missing __toString() part From: andrei@gravitonic.com (Andrei Zmievski) I am sorry if I missed the whole thread. I think that using the result of __toString() for indexing objects is a bad idea. If we want to allow this behavior (which is actually useful in some situations), I'd rather we had a __hash() method or something similar to what Python does. The string representation of the object and its hashed representation may be very different. -Andrei On Jun 3, 2006, at 4:42 AM, Marcus Boerger wrote: > Hello guys, > > the attached patch closes one more __toString() part. It allows > to use objects that define __toString as indexes to arrays. What do > you guys think about this, should we add it or stay with the old > behavior that didn't allow objects as indexes at all. > > -- > Best regards, > Marcus mailto:mail@marcus-boerger.de > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php