PHP 5.6 (5.6.13) vs PHP 7.0 (7.0.0RC2) vs opcode cache performance benchmark with common applications

September 6th, 2015 by bostjan

This benchmark is a quick test to confirm (or not!) what benchmarks on the internet report lately: PHP 7.0 performs better than its predecessors.


I did not care about application/server scaling, therefore request concurrency in the tests was always one (1). HTTP keepalive was used too, to exclude TCP latencies. Before actual measurement, an identical benchmark was done, to warm up the system. Some application exhibited wide response time variations, for unknown reasons (Magento, phpBB).

Applications tested:

  • WordPress
  • Magento
  • Drupal
  • MediaWiki
  • phpBB
  • phpMyAdmin

Only one application needed a bit of adjustment to work with PHP 7.0, and that is Magento. It was a simple fix:


So, without further ado, here is the results chart:


Raw data

Here is raw data, if someone would like to create better visualizations:

Relevant configuration and testing details:

  • Host: IntelĀ i7-3770, 32GB RAM, SATA disks
  • OS: single LXC container (Slackware in Slackware, custom built)
  • Apache HTTPD 2.4.16, PHP runs as embedded module
  • HTTP request logging was enabled, as it seems it does not influence results noticeably
  • MySQL 5.6.25, default table engine InnoDB
  • ApacheBench command: ab -k -c1 -n100
  • (additional details can be provided upon a request – not witholding it, but I am lazy:)


I can confirm that PHP 7.0, once stable, will bring substantial performance improvement. The fact that opcode cache offers additional performance optimization, is the most pleasant surprise. Initially I thought (quite pessimistically) that using opcode cache will nullify the expected performance gain. I am very glad that this is not the case. Very glad indeed.



Leave a Reply