URI Extension
PHP 8.5 adds a built-in URI extension to parse, normalize, and handle URLs following RFC 3986 and WHATWG URL standards.
Pipe Operator
The |> operator enables chaining callables left-to-right, passing values smoothly through multiple functions without intermediary variables.
Clone With
Clone objects and update properties with the new clone() syntax, making the "with-er" pattern simple for readonly classes.
#[\NoDiscard] Attribute
The #[\NoDiscard] attribute warns when a return value isn't used, helping prevent mistakes and improving overall API safety .
Closures and First -class Callables in Constant Expressions
static closures and first -class callables can now be used in constant expressions, such as attribute parameters .
Persistent cURL Share Handles
Handles can now be persisted across multiple PHP requests, avoiding the cost of repeated connection initialization to the same hosts .