Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77520 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 78386 invoked from network); 23 Sep 2014 09:35:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Sep 2014 09:35:15 -0000 Authentication-Results: pb1.pair.com smtp.mail=mike.php.net@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=mike.php.net@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.175 as permitted sender) X-PHP-List-Original-Sender: mike.php.net@gmail.com X-Host-Fingerprint: 74.125.82.175 mail-we0-f175.google.com Received: from [74.125.82.175] ([74.125.82.175:38539] helo=mail-we0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 23/FB-09206-1DE31245 for ; Tue, 23 Sep 2014 05:35:14 -0400 Received: by mail-we0-f175.google.com with SMTP id u57so3430031wes.34 for ; Tue, 23 Sep 2014 02:35:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=XuonUNGzL3gYfQCtZYaNyyoYDVBeUgSR6wJZhq74wfM=; b=vMm8K6F+mdbjTLmhPg2Qj/5dIzBnJPZGdqL4pa/igGmIQJFgSoWyP8BiWU++JOBXQP ai3Pz/Gzvy69cszU5/6WIGxZ5hRgRVbA9unKwI0tiDkZuN6xOstk5xdqD6Ddv4KsAZO2 bJVqvLSUJ1e9UQqYrjQXjeVyNZZWIyxNB27cZg9O15P6B41cl+PqUlZn8oNYYOQcMmtE IqG2dC8Izik3M9E0+3gKzf1tEqmARMoD5zhs4TDPBpKM3XEMdY51FWQMVc6FSetPAp4p FcOOxk7nlAfWiqgGw0mseOeLRzag9iff+pJcgIMhdNGmLK9Aqvo1zdQpO5ewuzrUPTDx RM2A== X-Received: by 10.181.27.132 with SMTP id jg4mr21569295wid.82.1411464910477; Tue, 23 Sep 2014 02:35:10 -0700 (PDT) Received: from [192.168.4.120] (178-18-170-101.customer.bnet.at. [178.18.170.101]) by mx.google.com with ESMTPSA id s2sm15243127wjz.8.2014.09.23.02.35.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Sep 2014 02:35:09 -0700 (PDT) Sender: Michael Wallner Message-ID: <54213ECC.5080204@php.net> Date: Tue, 23 Sep 2014 11:35:08 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 MIME-Version: 1.0 To: Leigh CC: Nicolai Scheer , PHP Internals References: <54213481.8080700@php.net> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Invokation on __toString() for object used as array key From: mike@php.net (Michael Wallner) On 2014-09-23 11:15, Leigh wrote: > On 23 September 2014 09:51, Michael Wallner wrote: >> >> Yes, it was removed intentionally (quite a long time ago), like using >> resources as array keys, to avoid hard-to-trace bugs for the user. At >> least that's the reasoning I can remember. > > He doesn't want to add the object as a key, he wants to invoke __toString(). Did I write that? > Is there really any harm in adding a IS_OBJECT case to > zend_whatever_add_array_element, and checking if it has a __toString? As already mentioned that behavior was intentionally removed. -- Regards, Mike