Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119398 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 59267 invoked from network); 23 Jan 2023 16:16:54 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 23 Jan 2023 16:16:54 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 76101180507 for ; Mon, 23 Jan 2023 08:16:53 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,MISSING_HEADERS, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS19151 66.111.4.0/24 X-Spam-Virus: No X-Envelope-From: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (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 ; Mon, 23 Jan 2023 08:16:53 -0800 (PST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id ED5CC5C0139 for ; Mon, 23 Jan 2023 11:16:51 -0500 (EST) Received: from imap44 ([10.202.2.94]) by compute1.internal (MEProxy); Mon, 23 Jan 2023 11:16:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ollie.codes; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to; s=fm3; t=1674490611; x=1674577011; bh=n25DbC4ALKyiR EK8VZ8ENM0oMMJkFG/8JWRdgNrRsrY=; b=jeyTaX6N6Ew2wwGJeEwLh71MteOyw L9QP5USMe6ku6AlPd8RhJ6yKbj8ouYnf4wxWCAaQ6ExRCu1SilruXvJu3DZiponq bZEpve7vdJjEdY+X0smU29aBP8U5Pz/38lEUaQfZMSVkwbCy7uKDao38riKJ5fA+ wTAE+qhRRPthQimuFMCQ6J+c4i1+3oCn5+2qqo0p9pAH5TiZ5uqULeq9Z4x8nDjt lp6nsaEAAKQDkAx1243PY4fhAmTpwUXoPA3lS/48L96Rc0xNaWBT/HmcoewwiuOn 0NAdNaUEO5/n0sxc3HORb3cu7LTkqIqYZGmYcF+VWokH/UHxdRbK8/xbw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1674490611; x=1674577011; bh=n25DbC4ALKyiREK8VZ8ENM0oMMJk FG/8JWRdgNrRsrY=; b=GvzMqp9U1osjb9a45p4Gi4S4nox2PnP3psznLlaeRlEG GufEnNyg0KD6m6ngnwnaVXicD0z140/zAxvc/se3FgAt8k2azPAiSEMdP4qTzkWu iNn8hjUsL61DDnG3HSXN3n/0RkxJCLAzj0aYylkW3DLdXVOBYgYulet0nL2c2K2F PgeynHYMrnXSR8TApeCMDQi1xkHnsGzEtz1k5kkl9TWPtEgWKq26FJ8ehHaBfOfN Q1wCw5TVscL7NijE8YTidCKfNKr3tcHeRxAFZulLfUYQmkg5nZWi02NFcZPP2566 IDVDegG7uhrRcbBjNoXOXHiXmdlqCidJmTn+AARFmA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedruddukedgjeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenuchmihhsshhinhhgucfvqfcufhhivghlugculdeftd dmnecujfgurhepofgfggfkjghffffhvefutgesrgdtreerreertdenucfhrhhomhepfdfq lhhlihgvucftvggrugdfuceophhhphesohhllhhivgdrtghouggvsheqnecuggftrfgrth htvghrnhepudekieethfeuhfeiuddttdetveeugffgkeelffeliedvvdegvdeguefhtdev tddvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepph hhphesohhllhhivgdrtghouggvsh X-ME-Proxy: Feedback-ID: i835c46d5:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id A200B36A0073; Mon, 23 Jan 2023 11:16:51 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-85-gd6d859e0cf-fm-20230116.001-gd6d859e0 Mime-Version: 1.0 Message-ID: In-Reply-To: References: <8f530a4a-bf48-4259-877e-16ebf8082936@app.fastmail.com> <88a59c46-9261-43f1-874d-ffc2f9caff32@app.fastmail.com> <99bc38dc-3d62-4a1e-a99c-e5daab3d779f@app.fastmail.com> Date: Mon, 23 Jan 2023 16:16:30 +0000 Cc: =?UTF-8?Q?Bj=C3=B6rn_Larsson?= Content-Type: multipart/alternative; boundary=16c19c175a814d659f8896bad1a17b5f Subject: Re: [PHP-DEV] Introduce the abiltiy to use the first-call-callable syntax on non-static methods, statically From: php@ollie.codes ("Ollie Read") --16c19c175a814d659f8896bad1a17b5f Content-Type: text/plain Oh, I didn't mean to suggest that it automatically binds. My second suggestion for how to achieve this does require some sort of automation. If you create a closure from Str::someMethod($arg1, $arg2) where someMethod isn't static, it should create a closure with the signature fn(Str $object, $arg1, $arg2), which would wrap a call to [$object, 'someMethod]($arg1, $arg2). However, perhaps the simplest solution, and one that could be done realtively easily and quickly, would be to delay the error, and allow static closures to bound with Closure::bind() if they represent a non-static method. --- Best Regards, *Ollie Read* --16c19c175a814d659f8896bad1a17b5f--