Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77518 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 75609 invoked from network); 23 Sep 2014 09:29:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Sep 2014 09:29:55 -0000 Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 192.64.116.216 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.216 imap10-3.ox.privateemail.com Received: from [192.64.116.216] ([192.64.116.216:41721] helo=imap10-3.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D9/5B-09206-19D31245 for ; Tue, 23 Sep 2014 05:29:54 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 214022400D4; Tue, 23 Sep 2014 05:29:51 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at imap10.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap10.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id XEcR4bTw7dIo; Tue, 23 Sep 2014 05:29:50 -0400 (EDT) Received: from [137.50.173.199] (oa-edu-173-199.wireless.abdn.ac.uk [137.50.173.199]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id 845E72400D0; Tue, 23 Sep 2014 05:29:50 -0400 (EDT) References: <54213481.8080700@php.net> Mime-Version: 1.0 (1.0) In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-ID: <453BCA76-4648-466B-9FFB-68BDAC146264@ajf.me> Cc: Michael Wallner , Nicolai Scheer , PHP Internals X-Mailer: iPhone Mail (12A365) Date: Tue, 23 Sep 2014 10:29:45 +0100 To: Leigh Subject: Re: [PHP-DEV] Invokation on __toString() for object used as array key From: ajf@ajf.me (Andrea Faulds) > On 23 Sep 2014, at 10:15, Leigh wrote: >=20 >> On 23 September 2014 09:51, Michael Wallner wrote: >>=20 >> 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. >=20 > He doesn't want to add the object as a key, he wants to invoke __toString(= ). >=20 > Is there really any harm in adding a IS_OBJECT case to > zend_whatever_add_array_element, and checking if it has a __toString? >=20 It'd be great if, for the UString class krakjoe is working on, it could impl= icitly convert. -- Andrea Faulds http://ajf.me/=