PHP 8.2 Performance Continues Moving In The Right Direction

Written by Michael Larabel in Programming on 23 May 2022 at 03:00 PM EDT. Add A Comment
PROGRAMMING
If release trends hold, we should be roughly half-way through the PHP 8.2 development cycle with the annual feature releases normally out toward the end of November. Given that, this weekend I decided to try out the state of PHP 8.2 Git and carry out some early benchmarks to get an idea where things are headed.


PHP 8.2 is introducing support for read-only (readonly) classes, a function for resetting the memory peak usage tracking, sensitive parameter value redaction in stack traces, deprecating of dynamic properties, and various other changes. Some testing over the weekend of PHP 8.2 Git went well and was uneventful.
PHP 8.2.0-dev 21 May

From an AMD Ryzen 9 5950X developer box, I ran some benchmarks seeing how PHP 8.2 Git was comparing to the latest PHP 8.1.6 release on the same system as just some very preliminary benchmarks for this roughly half-way point through the PHP 8.2 cycle.
PHP 8.2.0-dev 21 May

PHPBench was showing a roughly 2.5% increase in the PHP 8.2 performance over PHP 8.1, which isn't as large as seen as in some past releases, but keep in mind we are still far out from the actual PHP 8.2.0 release... And it's on top of the many performance gains already over the PHP 7.x and 8.x series.
PHP 8.2.0-dev 21 May

There were small but measurable improvements in some of my own Phoronix Test Suite performance benchmarks for various PHP CLI tasks.
PHP 8.2.0-dev 21 May

Like the time to generate many SVG graphs continues to improve with PHP 8.2.
PHP 8.2.0-dev 21 May

The peak memory usage on PHP 8.2 Git is also lower than PHP 8.1.

So at least from my initial testing, PHP 8.2 continues moving in the right direction of being faster albeit by within a couple percent in the various tests so far and with slightly lower peak memory usage too. Of course, once the PHP 8.2 stable release is approaching I'll be back around with many more benchmarks and going back to comparing the performance to more historical PHP5 and PHP7 releases too.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week