Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92030 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51869 invoked from network); 30 Mar 2016 19:46:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Mar 2016 19:46:12 -0000 Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.161.172 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.161.172 mail-yw0-f172.google.com Received: from [209.85.161.172] ([209.85.161.172:33300] helo=mail-yw0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C2/B3-28792-30D2CF65 for ; Wed, 30 Mar 2016 14:46:11 -0500 Received: by mail-yw0-f172.google.com with SMTP id h65so71660171ywe.0 for ; Wed, 30 Mar 2016 12:46:11 -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; bh=A768OF4Du40iyFNd/7168QKFxRbYBpDUYnQWHi3kVWs=; b=p5DbzbWUUP6PF8/OiL9udnQpAvv9Bbuk6vCt35ASVWxfcr7rajG6VpEADr1vconGWh yGQsx/SK/uIGk5FWOYHrAc8sbZGlx54ZsAgIleXGfx7+NoIR/QZzVwgMC+Ab3I+5AvAt pA52mxwwW3PAQs7DMqY5SLq5uh6YKImcIKdVHEtnQ1Ebwe7IOomHC2Uy/n4oC7OOAzlu RHcMcmjfKBgrKAiehNIbhZ+zrXJpfW6LfzqJvJlFxiys3G+GLha1XQMN9tdX6gucSlcj nAz0lEhpabXKWVa6jVrQ0qtfQxWGOLq5m+0+UQpOHPDuiS3Glfre+K4daYoPKy6g7je5 3xcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=A768OF4Du40iyFNd/7168QKFxRbYBpDUYnQWHi3kVWs=; b=Q0QVcc72zqpGl0dzYODnNrMzfjvqdE+YtJObmWcAxXuv1CwOeIF9fJpzlKGq6BwVaz 0mPu1s2+Llx/tFusLqz3k608gXAybOrJ8wdpd6nFMZsL37OQeVLRTAeIEFB1UEgbzMpY P03lasL0SNQsC4pvmOlDSb2hDTXqufc1xp6HSYU6vYTh3I4anthbTr9h/OJpxfc6VvvW EUenjlN5WpQi1ydGegvP/zgedxIZP4UuitpjMlCRoF69YAUj1XB5Awbjsbs5BD8aAxHY 2Gh5Sf6l1r/Dpkrfm+jcUaaATUmx1s52A7dofdzYnCRfkVcpENSMDFE2j2HF8SaGaUCD tRlA== X-Gm-Message-State: AD7BkJKFZGua2G4DBQiLEbif/BGD8AD7E/XKw7Dcj5Fk/8Fy0mu1jCcK70/gF8EQTAOLwq0R5nkKTNrZzAa7Zg== MIME-Version: 1.0 X-Received: by 10.129.50.13 with SMTP id y13mr4995932ywy.305.1459367169044; Wed, 30 Mar 2016 12:46:09 -0700 (PDT) Received: by 10.129.148.70 with HTTP; Wed, 30 Mar 2016 12:46:08 -0700 (PDT) In-Reply-To: References: Date: Wed, 30 Mar 2016 21:46:08 +0200 Message-ID: To: Dmitry Stogov Cc: Alexander Lisachenko , Antony Dovgal , PHP internals Content-Type: multipart/related; boundary=001a114207bcb552ea052f4965a5 Subject: Re: [PHP-DEV] Forbid binding methods to incompatible $this From: nikita.ppv@gmail.com (Nikita Popov) --001a114207bcb552ea052f4965a5 Content-Type: multipart/alternative; boundary=001a114207bcb552e5052f4965a4 --001a114207bcb552e5052f4965a4 Content-Type: text/plain; charset=UTF-8 On Wed, Mar 30, 2016 at 6:18 PM, Dmitry Stogov wrote: > Great it's not used anymore [image: 😊] > > I personally agree to remove this. > > > Nikita, can you also investigate the need for double pointer to object in > > > typedef union _zend_function *(*zend_object_get_method_t)(zend_object > **object, zend_string *method, const zval *key); > > > As I remember, it's necessary only for some SPL hack, and looks like a > terrible design decision. > This is used for forwarding method calls to the the "inner" object in SPL iterators. It's basically the internal equivalent of doing: function __call($method, $args) { return $this->inner->$method(...$args); } I don't think we can drop this feature at this point (deprecate?). We can of course change the implementation to use a trampoline function to avoid the zend_object** hack, but I'm not sure that would be worthwhile. Nikita --001a114207bcb552e5052f4965a4 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On W= ed, Mar 30, 2016 at 6:18 PM, Dmitry Stogov <dmitry@zend.com> w= rote:

Great it's not used anymore =3D"&#X1f60a"

I personally agree to remove this.


Nikita, can you also investigate the need for double pointer to object i= n


typedef union _zend_function *(*zend_object_get_method_t)(zend_object **= object, zend_string *method, const zval *key);


As I remember, it's necessary only for some SPL hack, and looks like= a terrible design decision.

This is = used for forwarding method calls to the the "inner" object in SPL= iterators. It's basically the internal equivalent of doing:
<= div class=3D"gmail_extra">
function __call($method, $args) {
=C2=A0=C2=A0=C2=A0 return $this->inner->$met= hod(...$args);
}

I don't thi= nk we can drop this feature at this point (deprecate?). We can of course ch= ange the implementation to use a trampoline function to avoid the zend_obje= ct** hack, but I'm not sure that would be worthwhile.

Nikita
--001a114207bcb552e5052f4965a4-- --001a114207bcb552ea052f4965a5--