Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118406 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 97015 invoked from network); 10 Aug 2022 20:22:06 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 10 Aug 2022 20:22:06 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 174341804AB for ; Wed, 10 Aug 2022 15:23:57 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-oi1-f176.google.com (mail-oi1-f176.google.com [209.85.167.176]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 10 Aug 2022 15:23:56 -0700 (PDT) Received: by mail-oi1-f176.google.com with SMTP id n133so19425218oib.0 for ; Wed, 10 Aug 2022 15:23:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=OXsRmFoeW46QmBd/WHBijcxS3pZsVPO9F2BejgEaFmg=; b=WkulJk08AlbNvKq2/yNCZyY0FrQFDLBHqSuvseqIpIXdwpY7muXIlxu4BQl4Uzl2d+ Dm3IQWGhGt8Vurnhwri3qoeDvTRlhrLcoR5sMnygC+0ZSBdmF1d4P81cOIfVWcVaMxhk d5Yurlj1YwKBaEBl/5coF2ZUjSlaPRhk2CSeJBzT9wI+dlb42zkstLh28+g4/C+ORLDC 9miGnS7WAzlwiNWQQKuLaC8KrSBnNz0hD4FQndLIBaC7YD8RYnrNU2TWlTR+wbMTAy/c CucPnqHM24/rRIvaRa9sVe9ercKnmzb4fPfSz7TA/bGntxdDipKZIPhhnZ62fPDA3ISV iIhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=OXsRmFoeW46QmBd/WHBijcxS3pZsVPO9F2BejgEaFmg=; b=OT4N2BQFa6q/jrBocHr/GSy2aepzJo0nqFI1vIzzE70LTLxigaTUZUft853UGDH3M3 Kf0f3aFd452p953j+QjV+z6eoLHaXRHRd3rmG3Wvw2bT2vVyBSqau+Gna/A2WRKTbG6u T3cfYQcSGx9vVUoEwB+kt+9l1Sy7zs2ESV465+mGYrawxu0gtakZWkr5LIoQ4I9ci1+9 Uz6YE1A6pFdqn9ol44FbDyzCVNCo0ObBG9SrGAeNmpLOSkZtHmhgoaLq9vXdyt8fRt8M Bje7/M3f9qiEoyi4l1tsuQUTP0H5afzzReGohqdB5ayMJy5BODxxh3iufvhCdf1zz4Zy JMxw== X-Gm-Message-State: ACgBeo3USVPDnv8edJ8/lnop6DSg4BTVgQeQzVTVq9un2zH0FDUlg6Ey HRlfl9PT/dpDanHBmMVGE9kCnie8IokbRF+aY/A= X-Google-Smtp-Source: AA6agR6OyUlMirYx6byRUW3ybJF1r2EqilczJO/Pl52YXx7P+Ajc7B8mIO+8h99Qp8bAWuZ6fJbKSuD4hYNmsy8OCoU= X-Received: by 2002:a05:6808:23c9:b0:33a:b548:69cb with SMTP id bq9-20020a05680823c900b0033ab54869cbmr2289959oib.104.1660170235693; Wed, 10 Aug 2022 15:23:55 -0700 (PDT) MIME-Version: 1.0 References: <62f3da67.810a0220.ed5e8.1b2cSMTPIN_ADDED_MISSING@mx.google.com> <17C7EF67-298D-40E8-A872-5A9D78A7EEDA@gmail.com> In-Reply-To: <17C7EF67-298D-40E8-A872-5A9D78A7EEDA@gmail.com> Date: Thu, 11 Aug 2022 00:23:44 +0200 Message-ID: To: Rowan Tommins Cc: PHP internals Content-Type: multipart/alternative; boundary="0000000000002a4e7305e5ea8184" Subject: Re: [PHP-DEV] Re: [Concept] Extension methods From: deleugyn@gmail.com (Deleu) --0000000000002a4e7305e5ea8184 Content-Type: text/plain; charset="UTF-8" On Wed, Aug 10, 2022, 11:30 PM Rowan Tommins wrote: > > To be honest, I put them in that order more for "purity" reasons: if they > come before __call, they can change the existing behaviour of the class, by > defining an extension method with the same name as a "virtual" method > implemented with __call. That then becomes a very different feature. > I would argue in favor of extension having precedence over __call because 1) classes with __call wouldn't be able to be `extended` and 2) extensions could actually "fix" the ~ab~use of some use of __call. I suppose this would allow me to write an Extension that mimics the exact behavior of __call and actually avoid __call from being hit while still keeping the same behavior of the class. --0000000000002a4e7305e5ea8184--