Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129969 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 3D97D1A00BC for ; Sat, 31 Jan 2026 17:54:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1769882085; bh=rPPoM5rWBnwXbyG+MMXrVtPMNAfS/Q8yptFLI5MNMCs=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=LjKhvarXHSyCXgKMRYK5CPgQ8YJ38ptmackMwzSNcukHFH1JjyoDx6YFuKU0hz97V C0buiXz5LY4zHx75r3vlEYMDJfgLv9ZmFvUe2fi0q2mR0IztcZE3tXw/FrHSZWR8y6 aqS3Cs/Re6yx4kiEPJ4SiuI0Xr5yR/Cyi0wOb4QdPD0fc3p0+7WjBUbNMq99UfYLe1 eOEsvqPR2OEFU243K6E36msnJltCb5m7HjIRR2NY5roHIfux0CLJBUFyrNAC23pVmk sZBilrnme23TSUddLyWofaTAJ9htusBH5GKhHaNOqmThWTTU3ZzABHKMJRmO9/w0EL a1+LBHlzKm7BQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 165B2180050 for ; Sat, 31 Jan 2026 17:54:45 +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.6 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_50, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS, FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) (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 17:54:41 +0000 (UTC) Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-82318b640beso1736032b3a.0 for ; Sat, 31 Jan 2026 09:54:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1769882076; cv=none; d=google.com; s=arc-20240605; b=AjWDYefTxc/yph0hTDkBfABPJLokMeMo5Fv1jHPEj3qf7RCEQyMtLs4ITRQj3x7k9y 3C+dbLJfIXcw/S5ChgMbve3rdGhVxVwjH/jxy2g9G/pfmMtgZCwMECsvRMSsTL08bKSW Tla+m17UIeQTEfywqMzvAKHr9arFDi1jFF/ay5fClRsi2YGb2kt2XfFdpmRB4ZCtgRKl 3ZAaHFAXVTMaBrV6f/Vej5e21Lb/8FgmvWY5g8w5NzsG47dzx188L77cXkT3IwgOTzSD rtutQPOCE64sBPg45nuqmIVjRh72sbXFH+pgeEAY2h7QSPbV4Kvbgas0XKCXhncmWlmU TSiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=rPPoM5rWBnwXbyG+MMXrVtPMNAfS/Q8yptFLI5MNMCs=; fh=xtZ9pwr8lK8jqbQIqecBsUFXoa/OsBi88Rsl3pGkTW8=; b=lFZ3zdlIvz6XZX99PWvBV9ffvWNJUmuUJITAiHt22XZatqifZAkMQtFNffO96wYqxK 8t/qo0W3UIIWZhRY5uKVUY69hlHavrjMwQQ77z25uKdjbey4DMTiWFYukpbIm95YRqDQ qZ26CuWOpbGsaLjkCCe0u0LCTkgdE4q8LZ5mJpUFWwy6IEj8+YcSzGmXvgYo0uSGCbqu TDWNjbVqGM0nupwie34bpsayElfNLmTzOpX/jKGVNif1LLEXO1yg/meQe6p48YZMoXaJ heMXtyeVL+ObmYABkwqTPH/hf3dhqiDDOcdbcBfPX5Ouz15KPiXHEWo4u/WqHzhsZbid /TXg==; 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=1769882076; x=1770486876; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=rPPoM5rWBnwXbyG+MMXrVtPMNAfS/Q8yptFLI5MNMCs=; b=j/pPlxJy4INWFbnkfwEplydYqEKlTnpTiHxVuaVvVLP/ru0BOb3PZ/iI0YYY43kkqO jKeqEDSgShtz5MykcZKUrILteMtr8d+1wQXFn3xBq8HQqGR4O/j7UOYHvuact5V732vG nPLe7Y9hIPw8Ia93SnB4IV9vsB25LS1JeK3Ua+3xTGBSEgR6aLB7eI6bk9akYJX0sb/m dAFZnQ4Kem23plxUyCR6E8A1t1l7N5qNUoDOgjA9IZk02P34CC0tFFbjdwe1HPqgz6Ys TCI9yt/uz32EgGdInjN24xw0ntqv0vA9hWQOS6fIuS+5KJUnN2wD4X7yJM5HGIaZaIhv FfFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769882076; x=1770486876; h=cc: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=rPPoM5rWBnwXbyG+MMXrVtPMNAfS/Q8yptFLI5MNMCs=; b=u22I326A8X9MUlMk+WOBPaYgRsx5bBgM8NomAa7Xz45G/pz295G7jeE1LodCOivwBB +Sfmmhbm12jd/vpY1/cYAVm16s2FpawhGk3boQRcHt6/jGoBaS2AUUvoXKw/wvMz4R/h Ms+Hw825yZzeXTBOcKvc+wQZLmjzEYeJa+r1cWG7MkxpxvJfJUA5D0lA2yx0+kscYhki JyhFcTxqwoYQcvKf7Tv8mtQpH9WL5Seu1SrayySRppy5DZW0DyVy8BegDOoTlEtMIb0r Skjek2FCJQegPogaEX2H1eGGeY/RLMPp66kT/JkGgNwv7AL2TPJnqgVgCknhly2QRIuk 6HsQ== X-Gm-Message-State: AOJu0YwJrdGmMz74V+QrfZ3ZPd3bT9H7xRw6S66unrk3tC4SaUO0JRXh VVgrtFw+PqaUdDyKj/Wgirzs2YOctaMEeRB8fqcPi3hQmK33/FUnpiUw0PU5zIVhinNSBR29KYS krmoBAzugJPHv4wDwBiWH45KJ6NHuP9fmwYDs X-Gm-Gg: AZuq6aJryjHu8TfZbAVRM4PgJobxGB+VgQbfw3iXSdLlb/AfLwyW/z9R2P+hviTeVKO 8DWy8Xj47Fagz43D8UXgAmEWfp4eBzsHwQY89DyS5iTQ20trhgF72a8m2yyXTECqi6UjZn18eJN xJXhLVnWCdodpzXEAGmKQrwJV/pv6rfkJWwKTJqZn0unICOOZ6//smhTdQZgCXpKrF4Qb81pc6N Q+hapjZcbz9hWKZs96w9W/sdQ+h7ylztqQzwysoP1lmVdxvJUiTHOkAx8Da4QCEjZT74zeI X-Received: by 2002:a05:6a20:12d6:b0:366:5332:466 with SMTP id adf61e73a8af0-392e012f876mr6225439637.53.1769882075753; Sat, 31 Jan 2026 09:54:35 -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 18:54:23 +0100 X-Gm-Features: AZwV_QiZQRuF4kbimJLd4zGpNP8tGMVtt3vYadhtOwpBNEaeXsQOAI6QoTAM4kE Message-ID: Subject: Re: [PHP-DEV] [RFC][Discussion] Closure optimizations To: Ilija Tovilo Cc: PHP internals Content-Type: multipart/alternative; boundary="0000000000006b78800649b2c8ba" From: jorg.sowa@gmail.com (Jorg Sowa) --0000000000006b78800649b2c8ba Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Ilija, Thank you for this improvement. If I understand correctly, one of the predicted BC changes will fix one of the issues with unit test comparisons. The sebastianbergmann/comparator library cannot compare closures, because each closure is in fact a different instance. With your change, this might be resolved for static closures. So I see this is in fact very beneficial for the unit testing. https://github.com/sebastianbergmann/comparator/issues/129 Kind regards, Jorg On Sat, Jan 31, 2026 at 12:41=E2=80=AFAM Ilija Tovilo wrote: > Hi everyone > > A week ago, I sent an e-mail to internals regarding two closure > optimizations with some subtle BC breaks. [1] While nobody objected, I > decided to create a short RFC anyway to avoid any possible controversy > due to the BC breaks. You can find it here: > > https://wiki.php.net/rfc/closure-optimizations > > Regards, > Ilija > > [1] https://externals.io/message/129825 > --0000000000006b78800649b2c8ba Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Ilija,=C2=A0

Thank yo= u=20 for this improvement. If I understand correctly, one of the predicted BC changes will fix one of the issues with unit test comparisons.

The sebastianbergmann/comparator library cannot compare=20 closures, because each closure is in fact a different instance. With=20 your change, this might be resolved for static closures. So I see this=20 is in fact very beneficial for the unit testing.

https://github.com/sebastian= bergmann/comparator/issues/129


Kind regards,
Jorg


On Sat, Jan 31, 2026 at 12:41=E2=80=AFAM Ilija Tovilo <tovilo.ilija@gmail.com> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex">Hi everyone

A week ago, I sent an e-mail to internals regarding two closure
optimizations with some subtle BC breaks. [1] While nobody objected, I
decided to create a short RFC anyway to avoid any possible controversy
due to the BC breaks. You can find it here:

https://wiki.php.net/rfc/closure-optimizations

Regards,
Ilija

[1] https://externals.io/message/129825
--0000000000006b78800649b2c8ba--