What PHP 8.6 Brings: Simplified Function Calls Illustrated
The article previews PHP 8.6’s upcoming function‑argument placeholder feature and shows how it can replace a multi‑step pipeline of arrow functions with a concise slug‑generation snippet, making the code shorter and clearer.
Reading font

The author looks forward to the official release of PHP 8.6, noting that the new support for certain function features will be very useful.
Previous code (PHP 8.5 and earlier):
$output = $input
|> trim(...)
|> (fn (string $string) => str_replace(' ', '-', $string))
|> (fn (string $string) => str_replace(['.', '/', '…'], '', $string))
|> strtolower(...);The pipeline relies on inline arrow functions to perform successive string replacements before converting the result to lower case.
Revised code after PHP 8.6:
$slugReplace = str_replace([' ', '_'], '-', ?);
$output = $input
|> trim(...)
|> str_replace(' ', '-', ?)
|> str_replace(['.', '/', '…'], '', ?)
|> strtolower(...);In the updated version, a variable $slugReplace is defined using str_replace, and the pipeline uses a placeholder ? to pass arguments directly to functions, eliminating the need for intermediate arrow functions.
This new placeholder syntax shortens the code, improves readability, and demonstrates one of the practical benefits expected from PHP 8.6’s enhanced function support.
For questions about attribution, corrections or content rights, please contactand we will review it promptly.