Re: [RFC][Discussion] Closure optimizations
| From: | Jorg Sowa | Date: | Sat, 31 Jan 2026 17:54:23 +0000 |
| Subject: | Re: [RFC][Discussion] Closure optimizations | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-129969@lists.php.net to get a copy of this message | ||
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 AM Ilija Tovilo <tovilo.ilija@gmail.com>
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
>