Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:23877 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 31314 invoked by uid 1010); 3 Jun 2006 12:45:14 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 31299 invoked from network); 3 Jun 2006 12:45:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Jun 2006 12:45:14 -0000 X-PHP-List-Original-Sender: helly@php.net X-Host-Fingerprint: 81.169.182.136 ajaxatwork.net Linux 2.4/2.6 Received: from ([81.169.182.136:59011] helo=strato.aixcept.de) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id A9/F7-22639-95481844 for ; Sat, 03 Jun 2006 08:45:13 -0400 Received: from baumbart.mbo (dslb-084-063-043-079.pools.arcor-ip.net [84.63.43.79]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by strato.aixcept.de (Postfix) with ESMTP id 61AD435C1C1; Sat, 3 Jun 2006 14:45:09 +0200 (CEST) Date: Sat, 3 Jun 2006 14:47:27 +0200 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <281938697.20060603144727@marcus-boerger.de> To: Pierre Cc: internals@lists.php.net, Dmitry Stogov , Andi Gutmans , Zeev Suraski , Ilia Alshanetsky In-Reply-To: References: <795156743.20060603134212@marcus-boerger.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Missing __toString() part From: helly@php.net (Marcus Boerger) Hello Pierre, ever thought that we use tests to check special behavior and that those snippets have little to do with real applications? Obviously not. The idea behind is that for instance you might use an array as a translation and use an object to *calculate* the index. Saturday, June 3, 2006, 2:40:29 PM, you wrote: > Hi, > On 6/3/06, 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. > $arr[new Test] = 'abc'; > makes very little sense to me, as well as > $a = new Test; $arr[$a] = 'abc'; > Do we really want to support that? > --Pierre Best regards, Marcus