PHP 8.5 was released today! The new release brings a set of language features and library additions aimed at making PHP code clearer, safer, and faster.
PHP 8.5’s headline additions include a brand-new URI extension (standards-compliant parsing for RFC-3986 and the WHATWG URL standard), a left-to-right pipe operator (|>) for readable call chaining, the Clone With syntax to update properties while cloning, a #[\NoDiscard] attribute that warns when important return values are ignored, support for closures, casts and first-class callables in constant expressions, and two convenience functions — array_first() and array_last() — to fetch the first and last array values directly.
The official release notes stress that the new URI extension is an “always-available” API intended to replace fragile parse_url() patterns and to provide safe, standards-aware URL handling out of the box. The extension is powered by existing parsing libraries and exposes immutable URI objects and utility methods for manipulating components.
One of the most visible syntax changes is the pipe operator. It lets developers write chains of transformations in a forward, readable style instead of deeply nested calls. For example:
$result = $input
|> trim(...)
|> (fn($s) => str_replace(' ', '-', $s))
|> strtolower(...);
The release notes include several such examples and linked RFCs for developers who want the low-level details.
Performance: testing shows strong gains

Independent early benchmarking from Phoronix shows PHP 8.5 performing best among the 8.x releases in several workloads they ran, including page/rendering tests used in their article visuals. The site reports “nice performance gains” in the early tests it ran for today’s release. As always, real-world results will vary by application, extensions, and deployment choices.
Safety, compatibility and deprecations
Alongside new features, PHP 8.5 introduces a handful of deprecations and backward-incompatibility notes. Examples include deprecating the backtick operator as an alias for shell_exec(), the removal of non-canonical cast names (encouraging (int), (bool), etc.), and warnings for some unsafe casting and destructuring uses. The PHP.net release and migration guide list the full set of breaking changes and migration advice. Administrators and library authors should review the migration guide before upgrading production systems.
Why this matters
The combination of modern APIs (URI extension), small ergonomic language improvements (pipe operator, Clone With), and safety features (NoDiscard, attributes on more targets) continues PHP’s trend of tightening type and API safety while improving developer ergonomics. The performance notes from independent testers make this release attractive for teams that prioritize throughput and low latency.




