Laravel Magazine
PHP 8.5 Is Here: The Pipe Operator, URI Extension, and More
Featured

PHP 8.5 Is Here: The Pipe Operator, URI Extension, and More

PHP 8.5 shipped on November 20, 2025, and it is one of the more interesting language releases in recent memory. After years of incremental type-system and performance work, this version adds genuinely new syntax that changes how you write everyday code. Here is what landed and what it means if you build on Laravel. The Pipe Operator The headline feature is the pipe operator, |>. It takes the value on the left and passes it as the single argument to the callable on the right, letting you chain transformations left to right instead of nesting them inside-out. // Before: read it from the inside out $result = array_sum(array_filter(array_map($fn, $items))); // After: read it top to bottom $result = $items |> fn ($x) => array_map($fn, $x) |> fn ($x) => array_filter($x) |> array_sum(...); If you have used collection pipelines in Laravel, the mental model is identical: data flows through a series of steps. The difference is that the pipe operator works on any value with any callable, not just...

Latest News

More Articles

Latest Links

Stay Updated

Subscribe to our newsletter

Get latest news, tutorials, community articles and podcast episodes delivered to your inbox.

Weekly articles
We send a new issue of the newsletter every week on Friday.
No spam
We'll never share your email address and you can opt out at any time.