Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129966 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 F05951A00BC for ; Sat, 31 Jan 2026 16:33:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1769877186; bh=0GWMu/UTclRZi2Nd8/EcpbHIU0korz2LirVaTY3XoZo=; h=References:In-Reply-To:From:Date:Subject:To:From; b=frHOEIZojUyb0G5P7n1PuedSCKC9zn3sc8NExLDKDnrQV+wNZT7xIr3Rugc16SOue xqAZxQY9Dh5LysRI0dTbl6kZ+LtUTLmsTId7Xsq0FUIM50izQgbEv84pssv9eAx0YG UDQuViaiuVIcFIfYieC/3Iu4q5mI8VWGs/9tUVoi5CwGAq6HxKq6kKTwMKSCUGzCOC dsUhZKMle6PwQ1vJslabP9LGMj1kSmsSAdSc3aerhUCo6ni8NVnqSwfosZj3je6+Fi LTWuWchqX31N+Rd2voOoNd8bf5q5Bgg1PSME+iz93fNi1laFD+KIq9oqryRHO96nuA fROXe4xywnh3A== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id A5619180050 for ; Sat, 31 Jan 2026 16:33:05 +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=1.6 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_50, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS, FORGED_GMAIL_RCVD,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-qv1-f51.google.com (mail-qv1-f51.google.com [209.85.219.51]) (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 ; Sat, 31 Jan 2026 16:33:05 +0000 (UTC) Received: by mail-qv1-f51.google.com with SMTP id 6a1803df08f44-8947e6ffd30so37601266d6.0 for ; Sat, 31 Jan 2026 08:33:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1769877179; cv=none; d=google.com; s=arc-20240605; b=NBHC7aLgoyShIFLz5xA7uQDB1OKBPS82sTCqSA7+6gcoVImfsQkOrb4eqgK3HwIEA2 BMjrWnjD54YXcb319VSZT3OgWlvdPdiYl6ejzNjDqG/wzAvExwswj9fUWQpVA43Kbjjn smT9QBncRMIGshATJOGj0NIcC5XI7v5kkEotpjGWIRGlTgHBOmaOinKs5ubNdPShao34 oqqh516NT5+me9Scdu82jORXWN+WK8RyVgn2oe3Ou6u8pWkD3Kj2Dlm27ovUNSeingqe HO44YQkSMHInex5UFTPlbB9owVLPtdp3uADAw6NRj7HmS8VAVC+0ICFLGniiniVjybGn QOJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=0GWMu/UTclRZi2Nd8/EcpbHIU0korz2LirVaTY3XoZo=; fh=PwvV1jWZOR90rDIG/6XexqaHJyAFBTdnFVhsS64qdEQ=; b=A0T3JuBfUnmoL58BLq6QvRCbGR+LhqIwJ/WSMDPzNtjewr3F+fY8N/FlbH8jwDF/0v UDdCAyElu5eKPzvZnYBlUK+jrEoxn3NzNSns5CwfA+hBBu3O1UOvijd/f03pQMYKVKiF xgKyzl9ENv5yux+322Yg3EvVTDJ6t2fqbD3bbfRjZRY0+hfRnWPHlTL3hS8bdxxH1XW7 XrkAGn7R2gVIiuVnRb2odJAJ6qDCAjpWIAj1bs312nsc47+ZZ02I6vwirUBrquSNur6X /Ev+gErxvFWaJurCirKDYwyatCKLaP6ZMMehb9D3MGLK1aYxdN8zpCoJAF86u6nkf6fG fZ+g==; darn=lists.php.net ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769877179; x=1770481979; darn=lists.php.net; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=0GWMu/UTclRZi2Nd8/EcpbHIU0korz2LirVaTY3XoZo=; b=hA5dyEGgmuonDhzH3lP/iYKyQ3E92W78yiD83M8qpMDcIDnma6zxeX+DWWzijeWTC4 OXqRes4UyPJa7XsOUWZVKRRQ9f9xkPs/9cwwkaJOlCKDU/VXFvhJpEMpkLE4xUtszF60 N4jyghsX3jhYfHZZyhUEOawQ2nwjYv1dnzLL5gYbZU9DnBNBOzm6zK0MUcRZW2nm3C7A mfxQIipyDGN+mQIdiygzfT96UnVe1htz7jtjYUgQDikZecgD7DAFbgIKaCe8lSf1cmj3 rW3/w3jqVlqIuNDbzJl8ntAugvRnXFWLEp1fg5dlgvLD3hmzj4xVMV/SqAEMobe2jdwo 5oyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769877179; x=1770481979; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=0GWMu/UTclRZi2Nd8/EcpbHIU0korz2LirVaTY3XoZo=; b=w0XgoOC/738w+SgpJcSOk8O2m5jcpoaGx+iIujAw8/eBwSKQXjwDa4nwJ7dfSTmQKd E1Ruj8RFByTT+3tIdyF1xvvWxzRb2nkWnktr0/LSp0TK0WYmdg7EoLxCuBkATByHNjrg v9dV1nQn+oIfCrx0JPrG3nHnHW6X+I9yhOhfDQz4c0RjxUP2PSbObqJ1VSH05hsPiabh srIBVSnkApZ2mleHWTJMM1K+WrTTtIgnw9fK1/tDUNNo55aG6yGBKeuqP8oXkIe8wj+l 7heakHbJI4BG7zVPzdYrR45O1mHjAzNJ//Q6Q7hwga+qGfPUKz7R6F2uhjQP5HblNxVe iWbw== X-Gm-Message-State: AOJu0YzeguixlOc5FP63C6e1qQlLuyqGEOHwl5DIb4OWb092rV9b66EM s2nTSCaTd/cJqda0GLoVb9StB2H79+aPkb+UJXwxA/MW77WPoEEhqIXaV4O+1yjOGrD78crVsd9 k0oxAT9R8ZeyxUyPBK+jPsZ7RfnXCsiPkedFxy86isQ== X-Gm-Gg: AZuq6aLfN28hvo43tZMgfpCUaQXc4brt+//95W/Qojg0DBR/v35Lw3YPvaHQnL9jvfK L3GJYniGF02ECrkkFVPvT6CSnhN3iBYeRONoV4mn/XaDjl4NkETUqadiUCCbsyPFfWWjkQLzWu+ ux8NUVQ8MFp0ijS7Ee9/Nl0o1vECiPSKtfmv5eC5q+M/PgogUQ8w9kHq1gcg0eXwO1elIefg2+p MfkOdROoOSQJxg/9LPRz1pWL5hpx1OX02gec98PF3eGUmMvwgdmig2Fck+N0ODpQGQJLoBuIWp8 k/2tSZL//vzzSXocJVjHvRiY2ow+EQ== X-Received: by 2002:ad4:5cea:0:b0:87c:275d:adcd with SMTP id 6a1803df08f44-894ea0b5420mr91873016d6.41.1769877179553; Sat, 31 Jan 2026 08:32:59 -0800 (PST) Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 References: In-Reply-To: Date: Sat, 31 Jan 2026 17:32:48 +0100 X-Gm-Features: AZwV_QiLqvB1wNwqUuzAUHxm_iWsSlFnCVZ62_inulxY_-yoFderclUBslazqQk Message-ID: Subject: Re: [PHP-DEV] [RFC][Discussion] Closure optimizations To: PHP internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable From: tovilo.ilija@gmail.com (Ilija Tovilo) Hi Bob On Sat, Jan 31, 2026 at 4:59=E2=80=AFAM Bob Weinand w= rote: > > On 31.1.2026 00:40:05, Ilija Tovilo wrote: > > https://wiki.php.net/rfc/closure-optimizations > > I'm a bit disappointed that you felt necessary to introduce bureaucracy f= or a straightforward very minor BC break. I don't like this something to be= come necessary or expected in future. Sending that email was completely suf= ficient. > > I would like to encourage you to recognize that and simply merge your pul= l request. I agree that the BC break is fairly minimal. What made me decide to create an RFC after all is highlighted here: > ReflectionFunction::getClosureThis() will now return NULL for closures th= at are inferred as static. This might be slightly surprising, given static = inference does not work 100% reliably, limited by the rules previously desc= ribed. ReflectionFunction::getClosureThis() will work as long as the closure uses $this, but it will also work if it calls static methods. Once you remove the static call, it will break. Now, I don't think ReflectionFunction::getClosureThis() is something many people rely on, nor should they, but it is nonetheless surprising. I'd like to avoid the situation where this is categorized as a bug that is effectively impossible to solve without removing the optimization. Ilija