Monday November 24th 2025
PHP 8.5 Released
On November 20th 2025 the latest version of PHP was released.
PHP 8.5 moves the language on with many new features, the few I'm pleased with include:
The Pipe Operator - This allows the chaining of operations for far more readable code you can now do this:
<?php
$content - "This is the content we want to play with" |> strtoupper |> str_replace("to play with", '');
echo $content; // Outputs: THIS IS THE CONTENT WE WANT
![]()
PHP 8.5 brings in a nice handful of useful additions.
Also new is an improved URI handler, something we need to play around with often.
<?php
use Uri\Rfc3986\Uri;
$uri = new Uri('https://orionesque.com/blog');
var_dump($uri->getHost());// string(7) "orionesque.com"
Lastly, something that comes under “didn't we have this already…?” Some simple array helpers
<?php$array = [1, 2, 3, 4, 5];
$first = array_first($array);echo $first; // Output: 1
$last = array_last($array);echo $last; // Output: 5
