PHP 8.5 is out today as the annual major feature release for this popular scripting language.
PHP 8.5 delivers many new features including the pipe operator, support for backtraces on fatal errors, support for closures and first-class callables in constant expressions, support for casts in constant expressions, array_first() and array_last() built-in functions finally, and a variety of other improvements.
The pipe operator is one of the main language changes this release. The pipe operator is described in detail on the PHP.net documentation page. There is also now the “NoDiscard” attribute to indicate a function’s return value is important and should be consumed.
PHP 8.5 is also looking good in the performance department. In my early benchmarking of PHP 8.5, it’s showing some nice performance gains in the generating of the SVG graphs used on Phoronix articles from benchmarking.
Downloads and more details on today’s PHP 8.5 release via PHP.net.
