Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129353 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id 7B6EF1A00BC for ; Fri, 21 Nov 2025 03:47:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1763696835; bh=1S4yDN5mPFgvmEE9HbiZKKnJkZPR9pdvUtT/stJzjrU=; h=Date:To:From:Cc:Subject:In-Reply-To:References:From; b=nYK7z/ojN31zbfCeFes7srsron+AW2JrnZt1ciYA9h5736Q19C28G4APW7zIgtH8d SrkawTYTycjd2lev6qcKXXLck8OOHfq4YpuFUBK+ru77zH+cYqLPghGSiDYWi8Waup 8m1iF/+2pS5rlk7mY5jqpqm6hQA4Ygh6E6vbCHF2ccJTeKOFVQvFTKK8prWe3GM+n6 p4BgpuHd7QBmtxgKlsVRojAjaYhIIGVAeCi8pt+Dfo8VclsxWAzLp30yOrJ3BBF+zB 0bkM1JQ11kUjPmPdw1BsIwGJdt4vZLjN1O/i53j208GP7NAWhp4hpLoHSqU079/l49 UHEFgs1t8yqGg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D59EE1804B0 for ; Fri, 21 Nov 2025 03:47:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-4317.protonmail.ch (mail-4317.protonmail.ch [185.70.43.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 21 Nov 2025 03:47:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gpb.moe; s=protonmail; t=1763696823; x=1763956023; bh=1S4yDN5mPFgvmEE9HbiZKKnJkZPR9pdvUtT/stJzjrU=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=fpnuiN0fcrUrwEN8SMTtl/GcbQcnzQJ7+erwqusZoPfe0Eqhy4N6d5qViWj0XXZ1Z 1FJSYOIlM+rROLf+uRLbJIDpM2zEHumWkuSWpZerCrQzse7N/qKPGBo5lhZqaz5uZk PL0mj+ZjYkYfQ0zHE3Hjs9b/Wbs9UK+A/UByZIw2dbL8O8QkSu/uvz3OXyxEopNq5H LgkBujbrObtLRyqC341rCQBjuKuAaf1+B9s9dUXIO7udMQG4JvpfJQxxvzNaLb0DEv z4dSe8A+jPp8MvF5AlA6eDt0heA0oC8dFAupVKFCJG3BY1G/QiJkR9o6Pfz2tK4op0 WYLROXutFPxXg== Date: Fri, 21 Nov 2025 03:47:00 +0000 To: Arnaud Le Blanc Cc: Valentin Udaltsov , php internals Subject: Re: [PHP-DEV] First-class constructor callables Message-ID: In-Reply-To: References: Feedback-ID: 96993444:user:proton X-Pm-Message-ID: 23c2892ba59ab44fbf1eef90e5d8ae8c2955145a Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: internals@gpb.moe ("Gina P. Banyard") On Thursday, 20 November 2025 at 16:40, Arnaud Le Blanc wrote: > On Thu, Nov 20, 2025 at 3:21=E2=80=AFPM Arnaud Le Blanc arnaud.lb@gmail.c= om wrote: >=20 > > Hi Valentin, > >=20 > > On Thu, Nov 20, 2025 at 2:20=E2=80=AFPM Valentin Udaltsov > > udaltsov.valentin@gmail.com wrote: > >=20 > > > Question for Larry and Arnaud: > > >=20 > > > In PFA v2, you note that constructor references pose significant tech= nical challenges. > > > Could you elaborate on what those challenges are and whether they are= fundamental, or potentially addressable with a more limited or explicit sy= ntax such as `new Foo(...)`? > >=20 > > One issue is that partial application needs to resolve the function > > being applied, but constructors can not be resolved without > > instantiating the class first (at least, not on all classes). >=20 >=20 > To clarify, constructors are normally resolved after creating an > object, by calling the get_constructor() handler on the object. The > handler isn't known before creating the object, at least for internal > classes, so we can't resolve a constructor without creating an object > first. This would have to be addressed in order to support partial > application of classes. Oh so one more reason to get rid of the get_constructor() handler then. Would the approach that I started prototyping in https://github.com/php/php-src/pull/19797 help as we would know the zend_function the moment we have the CE? Best regards, Gina P. Banyard