PHP 8.5 introduces the pipe operator (|>) that allows chaining function calls in a more readable way. Instead of deeply nested function calls or temporary variables, developers can pipe values through a series of transformations. The operator works with first-class callables for single-argument functions or closures for multi-argument functions. While currently requiring closures for complex operations, future partial function application support could make it even more concise.
8 Comments
Sort: