PHP 7.0 RC1 Is Running Much Faster Than PHP5, But Still Not Beating HHVM
Written by Michael Larabel in Compiler on 31 August 2015 at 07:00 PM EDT. 14 Comments
With PHP 7.0 RC1 having been released last week, I've spent a fair amount of time in the past few days trying out this first release candidate for the huge PHP 7 milestone.

Of course, most of my PHP interest revolves making sure it's running well for the Phoronix Test Suite, Phoromatic, and My latest results do show PHP 7 being much faster than the current PHP 5.6 stable series, but not quite as fast as Facebook's latest HHVM packages.

The benchmarks today are from an Intel Haswell-E Xeon system running Ubuntu 15.04 x86_64. First up are the PHP 5.6 results as packaged in Ubuntu Vivid. All of the tests were running the Phoronix-Test-Suite code on GitHub as of today while running phoronix-test-suite debug-self-test, which stresses a lot of the internal hot code-paths of PTS. There's a lot of XML parsing, JSON handling, computations, DOM interactions, graph rendering, etc.
PHP:  5.6.4-4ubuntu6.2
DETAILED_SYSTEM_INFO:          0.187 seconds
LIST_AVAILABLE_TESTS:          0.006 seconds
LIST_AVAILABLE_SUITES:         0.467 seconds
INFO:                          0.602 seconds
RESULT_FILE_TO_TEXT:           0.221 seconds
DIAGNOSTICS:                   0.007 seconds
DUMP_POSSIBLE_OPTIONS:         0.001 seconds
DEBUG_RENDER_TEST:             95.429 seconds

ELAPSED TIME:                  330.432 seconds
PEAK MEMORY USAGE:             612.5 MB
PEAK MEMORY USAGE (emalloc):   568.698 MB

It took 330 seconds to run the entire test on the Phoronix Test Suite Git while the peak memory usage was at 612MB.
PHP:  7.0.0RC1
DETAILED_SYSTEM_INFO:          0.166 seconds
LIST_AVAILABLE_TESTS:          0.003 seconds
LIST_AVAILABLE_SUITES:         0.369 seconds
INFO:                          0.432 seconds
RESULT_FILE_TO_TEXT:           0.201 seconds
DIAGNOSTICS:                   0.006 seconds
DUMP_POSSIBLE_OPTIONS:         0.003 seconds
DEBUG_RENDER_TEST:             42.920 seconds

ELAPSED TIME:                  169.775 seconds
PEAK MEMORY USAGE:             455.73 MB
PEAK MEMORY USAGE (emalloc):   361.571 MB

The PHP 7.0 RC1 result is certainly impressive! The performance was nearly doubled, which is what is largely expected with PHP 7 being about twice as fast as PHP 5.6. The peak memory usage was also lower at 455MB. The big improvement to DEBUG_RENDER_TEST is also beneficial to Phoronix readers using OpenBenchmarking and as once deployed there the large result files should load much faster.
PHP:  5.6.99-hhvm
DETAILED_SYSTEM_INFO:          0.510 seconds
LIST_AVAILABLE_TESTS:          0.019 seconds
LIST_AVAILABLE_SUITES:         0.493 seconds
INFO:                          0.655 seconds
RESULT_FILE_TO_TEXT:           0.229 seconds
DIAGNOSTICS:                   0.038 seconds
DUMP_POSSIBLE_OPTIONS:         0.006 seconds
DEBUG_RENDER_TEST:             27.096 seconds

ELAPSED TIME:                  121.72 seconds
PEAK MEMORY USAGE:             8755.141 MB
PEAK MEMORY USAGE (emalloc):   510 MB

When using the official HHVM packages for Ubuntu 15.04, the performance did outpace the current PHP 7.0 development version. HHVM 3.6.99 ran the same test in 121 seconds compared to the 169 seconds with PHP 7.0-RC1. However, the reported peak memory usage was significantly worse... 8755MB on HHVM vs. 455MB with PHP 7. I even had to adjust the memory_limit within the PTS code to accommodate HHVM running the test without a fatal error.

Stay tuned for more PHP 7 benchmarks shortly on Phoronix.
About The Author
Author picture

Michael Larabel is the principal author of and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 10,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 automated benchmarking software. He can be followed via Twitter or contacted via

Related Compiler News
Popular News