PHP 8.5 enables secure URI and URL parsing
Briefly

PHP 8.5 enables secure URI and URL parsing
"PHP 8.5 has been released, adding an extension for securely parsing URIs and URLs to the now-30-year-old server-side scripting language. Described as a major update, PHP 8.5 was released November 20 and can be accessed at PHP.net. The URI extension featured in the update is always available and provides APIs to securely parse and modify URIs and URLs based on the RFC 3986 and WHATWG ( Web Hypertext Application Technology Working Group) URL standards."
"PHP 8.5 also features a pipe operator that allows chaining function calls together without dealing with intermediary variables. The pipe operator enables replacing many "nested calls" with a chain that can be read forward, instead of inside-out. Additionally in version 8.5, developers can update properties during object cloning by passing an associative array to the clone() function. This enables straightforward support of the "with-er" pattern for read-only classes."
"Developers using PHP 8.5 can also take advantage of a #[\NoDiscard] attribute. By adding this attribute to a function, PHP will check whether the returned value is consumed and emit a warning if it is not. The associated (void) cast can be used to indicate that a value is intentionally unused. Additionally in PHP 8.5, static closures and first-class callables now can be used in constant expressions. This includes attribute parameters, default values of properties and parameters, and constants, according to the update documents."
PHP 8.5 was released November 20 and is available from PHP.net. The release adds an always-available URI extension with APIs to securely parse and modify URIs and URLs following RFC 3986 and WHATWG URL standards. A new pipe operator enables readable forward chaining of function calls without intermediary variables, reducing nested call complexity. Cloning now supports updating properties by passing an associative array to clone(), enabling the with-er pattern for read-only classes. A #[\NoDiscard] attribute causes PHP to warn when function return values are unused, with a (void) cast to mark intentional discards. Static closures and first-class callables can now appear in constant expressions.
Read at InfoWorld
Unable to calculate read time
[
|
]