Description
Support for the upcoming version 8.6 of PHP.
(Scheduled to be released in late November 2026)
Use case/motivation
The PHP RFC: Partial Function Application (v2) introduces a native syntax to pre-fill some arguments of a function call while leaving others open for later.
The syntax uses a ? placeholder for a single open argument (e.g., str_replace('hello', 'hi', ?)) and ... for remaining variadic arguments, completely removing the need to write verbose, custom anonymous arrow functions.
Calling a function this way returns a standard Closure object that only expects the remaining missing arguments.
This feature drastically cleans up functional-style programming, making it highly readable when using inline callbacks or chaining operations with the pipe operator.
Related issues
No response
Are you willing to submit a pull request?
No
Description
Support for the upcoming version 8.6 of PHP.
(Scheduled to be released in late November 2026)
Use case/motivation
The PHP RFC: Partial Function Application (v2) introduces a native syntax to pre-fill some arguments of a function call while leaving others open for later.
The syntax uses a
?placeholder for a single open argument (e.g.,str_replace('hello', 'hi', ?)) and...for remaining variadic arguments, completely removing the need to write verbose, custom anonymous arrow functions.Calling a function this way returns a standard
Closureobject that only expects the remaining missing arguments.This feature drastically cleans up functional-style programming, making it highly readable when using inline callbacks or chaining operations with the pipe operator.
Related issues
No response
Are you willing to submit a pull request?
No