Looking At The PHP 8.0 Performance So Far In Early 2020

Written by Michael Larabel in Programming on 26 February 2020 at 05:55 PM EST. 10 Comments
PROGRAMMING
With it being a while now since the PHP 7.4 release and the PHP developers continuing to be busy at work on PHP 8.0 as the next major installment of the popular web programming language, here is a fresh look at the performance of PHP 8.0 in its current state -- including when its JIT compiler is enabled -- compared to releases going back to PHP 5.6.

Most exciting with PHP 8.0 is the JIT compiler that has the ability to provide better performance on top of all the gains already scored during PHP 7.x releases. PHP 8.0 is also bringing support for static return types, weak maps, union types, improved errors and warnings, and more is surely to come -- stay tuned to the PHP RFC page. The latest indications are PHP 8.0 isn't expected for release until the very end of 2020 or early 2021.

The PHP JIT Wiki page outlines the current design of the PHP just-in-time compilation and the flags for enabling the JIT support and its different tunables. For today's benchmarking, PHP 8.0 was built from PHP Git master as of this morning as well as the latest stable PHP 5.6 / 7.0 / 7.1 / 7.2 / 7.3 / 7.4 releases for reference.
Early PHP 8.0 Performance Benchmarks

This round of testing from the PHP CLI was done on an Intel Core i9 9900KS system.
Early PHP 8.0 Performance Benchmarks

With PHP 8.0-dev was just under 8% higher performance for PHPBench compared to the current PHP 7.4 stable series but enabling the JIT with opcache hadn't helped out for this particular test.
Early PHP 8.0 Performance Benchmarks

Early PHP 8.0 Performance Benchmarks

Within the PHP micro-benchmarks were slight gains out of PHP 8.0-dev compared to PHP 7.4.
Early PHP 8.0 Performance Benchmarks

Within our own performance test of our PHP code, going from PHP 7.4 to 8.0 hadn't yielded any change in performance until enabling the JIT support where a few seconds were then shaved off the test time.
Early PHP 8.0 Performance Benchmarks

Early PHP 8.0 Performance Benchmarks

Compared to the PHP5 days, PHP 7.4/8.0 is a hell of a lot faster.
Early PHP 8.0 Performance Benchmarks

So far PHP 8.0 is shaping up to offer modest performance work over PHP 7.4 but it will be more interesting to re-visit when PHP 8.0.0 is actually closer to being released for seeing how the Xeon and EPYC performance is looking with PHP 8.0 on more workloads. But at least for now the PHP 8.0-dev experience including with JIT was pleasant and it's never too early to begin testing PHP code for compatibility with this next big update.
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