PHP 8.6 will introduce partial function application (PFA), allowing developers to create function references with some parameters pre-filled using placeholders. The `?` placeholder represents a single argument, while `...` captures zero or more parameters. This feature builds on PHP 8.1's first-class callables and pairs especially well with PHP 8.5's pipe operator, eliminating the need for verbose closure wrappers. PFA supports multiple placeholders, named arguments, object methods, static methods, and magic methods, with clear error messages for invalid usage.

5m read timeFrom stitcher.io
Post cover image

Sort: