Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77516 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 72346 invoked from network); 23 Sep 2014 09:15:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Sep 2014 09:15:31 -0000 Authentication-Results: pb1.pair.com header.from=leight@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=leight@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.174 as permitted sender) X-PHP-List-Original-Sender: leight@gmail.com X-Host-Fingerprint: 209.85.212.174 mail-wi0-f174.google.com Received: from [209.85.212.174] ([209.85.212.174:57630] helo=mail-wi0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1B/AA-09206-23A31245 for ; Tue, 23 Sep 2014 05:15:31 -0400 Received: by mail-wi0-f174.google.com with SMTP id fb4so4422485wid.1 for ; Tue, 23 Sep 2014 02:15:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=wFj8e13jqIsGoKF1l0f5OIlTakS0lc3ow28Wc3s7zrY=; b=K+4RwF5KHeSM2GdZl/TqKK2F/9dYYhO2vDQTPoiXlgtA/2w2d7Iwp/WYzQSoktA7Cb Qz99b5ojBYKcaW6tRyePVUjLWAuqQPTbvTEg3Mok4YrcH5sRjbtIsBG3gM01SpJzg7yZ GH5s4coS+U8PVC2RLKBpWhnzrpQA5s9qguMmN5GiYNbcsut7SZD9rBBLna2dNdfO7PPA 0bsmbt8WK0MNQXT1tMe2yWrLuk17Eb2pHY18xxh7HwslDWvhjYOt7VO4AV2t8rAGQsYU LI7eAT4b9jPTjUb/u+ouYS6aZ3gxrIbwDUfJnGUmugBCuaanI9J395jksAl06Br1Ia0g /C3g== MIME-Version: 1.0 X-Received: by 10.194.79.35 with SMTP id g3mr1978138wjx.110.1411463728307; Tue, 23 Sep 2014 02:15:28 -0700 (PDT) Received: by 10.217.55.195 with HTTP; Tue, 23 Sep 2014 02:15:28 -0700 (PDT) In-Reply-To: <54213481.8080700@php.net> References: <54213481.8080700@php.net> Date: Tue, 23 Sep 2014 10:15:28 +0100 Message-ID: To: Michael Wallner Cc: Nicolai Scheer , PHP Internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Invokation on __toString() for object used as array key From: leight@gmail.com (Leigh) 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(). Is there really any harm in adding a IS_OBJECT case to zend_whatever_add_array_element, and checking if it has a __toString?