Re: Array arguments for str functions
| From: | Larry Garfield | Date: | Mon, 16 Mar 2026 22:07:08 +0000 |
| Subject: | Re: Array arguments for str functions | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-130378@lists.php.net to get a copy of this message | ||
On Mon, Mar 16, 2026, at 9:30 AM, Tim Düsterhus wrote:
> I have also added an optimization to PHP 8.6 that compiles
>
array_map()
> into a foreach loop when the callback is first class callable or PFA:
> https://github.com/php/php-src/pull/20934. I plan to extend
> this to the
> other array_* functions once the PFA PR is merged.
>
> Best regards
> Tim Düsterhus
!!! I didn't realize you'd done so. That's awesome, and needs more publicity. :-)
With all the compile optimizations around pipes, PFA, etc., I wonder if there's a way to make
it more generic? Like, can tools be built for pipes and PFA that can get down-compiled, without
having to special case everything in the engine?
--Larry Garfield