Each year we try and take a deep dive into performance benchmarks across various platforms and see how different versions of PHP and HHVM stack up against each other. This year we went all out and benchmarked four different PHP engines and HHVM across 20 different platforms/configurations; including WordPress, Drupal, Joomla!, Laravel, Symfony, and many more. We also tested popular eCommerce solutions such as WooCommerce, Easy Digital Downloads, Magento, and PrestaShop.

We are always encouraging WordPress users to take advantage of the latest supported versions of PHP. Not only are they more secure, but they offer additional performance improvements. We aren’t talking just about WordPress either, this true for the most part across all platforms. We’ll show you today how PHP 7.2 knocks the socks off of everything we put it against! 🚀 

The results this year have drastically changed from our previous benchmarks where HHVM was the winner. We now are excited to see PHP 7.2 as the leading engine in terms of speed. It’s important to note that as far as WordPress is concerned, HHVM is no longer supported and will slowly be fading away. We no longer encourage our customers to move to HHVM and also noticed support for it across various platforms was subpar as well.

This is great news for developers and end-users alike as it means more of a focus back on PHP and providing faster websites and web services for everyone.

We tested performance of 20+ platforms/configurations on 5 different engines and #PHP 7.2 took the gold in 14/20! 

PHP & HHVM Benchmarks (2018)

For each test, we used the latest version of each platform and benchmarked the home page for a minute with 15 concurrent users. Below are the details of our test environment.

  • Machine used: 8x Intel(R) Xeon(R) CPU @ 2.20GHz (Powered by Google Cloud Platform and running in an isolated container)
  • OS: Ubuntu 16.04.3 LTS
  • Docker Stack: Debian 8, Nginx 1.13.8, MariaDB 10.1.31
  • PHP Engines: 5.6, 7.0, 7.1, 7.2
  • HHVM: 3.24.2
  • OPCache: For WordPress, Joomla, and Drupal, we used the official Docker image. For the rest we used the same image setup with the OPcache enabled using the following recommended php.ini settings.
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60
opcache.fast_shutdown=1
opcache.enable_cli=1

The tests were performed by Thoriq Firdaus a WordPress contributor and support engineer here at Kinsta. He’s contributed to WordPress Core and Translation Editor for WordPress Indonesia.

What is PHP?

PHP stands for Hypertext Preprocessor. It is one of the most popular scripting languages on the web today. According to W3Techs, PHP is used by over 83% of all the websites who use a server-side programming language.

What is HHVM?

Due to performance issues with PHP the team at Facebook developed the HipHop Virtual Machine (HHVM). It is a system that uses just-in-time (JIT) compilation to convert PHP code into a machine language to establish a synergy between the PHP code and the underlying hardware that runs it.

Platforms and Configurations Tested

Our tests include the following 20 platforms/configurations. On some, we had to test multiple versions due to the lack of support for a specific PHP version. Click on one below to skip directly to its test notes and results. The data is measured in requests per second. The more requests the better.

WordPress 4.9.4

The first platform we tested was, of course, one of our favorites: WordPress (we might be a little biased being that we live and breath this CMS on a daily basis 😉). At its core, WordPress is open-source software you can use to create a beautiful website, blog, or app. In fact, WordPress powers over 29% of all the websites on the internet. Yes – more than one in four websites that you visit are likely powered by WordPress.

WordPress CMS

For the WordPress benchmark, we utilized the free Twenty Seventeen theme. We used dummy content from wptest.io and benchmarked the home page for a minute with 15 concurrent users.

  • Number of Posts: 10 / page generated with wptest.io
  • “Search” sidebar is the only thing present on the Sidebar
  • Docker Image is derived from https://hub.docker.com/_/wordpress/
WordPress benchmarks

Benchmark Results

  • WordPress 4.9.4 PHP 5.6 benchmark results: 49.18 req/sec
  • WordPress 4.9.4 PHP 7.0 benchmark results: 133.55 req/sec
  • WordPress 4.9.4 PHP 7.1 benchmark results: 134.24 req/sec
  • WordPress 4.9.4 PHP 7.2 benchmark results148.80 req/sec 🏆
  • WordPress 4.9.4 HHVM benchmark results: 144.76 req/sec

PHP 7.2 was the winner, proving to be slightly faster than HHVM. This is a significant change from our benchmarks in 2016 where HHVM was clearly the winner. PHP for WordPress is also a lot more stable. We have experienced first-hand many issues with HHVM. And if you compare PHP 7.2 to PHP 5.6, it can handle 3x as many requests (transactions) per second!

WordPress 4.9.4 + WooCommerce 3.3.1

WooCommerce is a fully customizable, open-source eCommerce platform built for WordPress. It’s also by far, one of the most popular eCommerce solutions, powering over 42% of all eCommerce sites on the internet.

WooCommerce

For this next test, we took WordPress along with WooCommerce installed. We utilized the free Storefront eCommerce theme.

WordPress + WooCommerce benchmarks

Benchmark Results

  • WordPress 4.9.4 + WooCommerce 3.3.1 PHP 5.6 benchmark results: 34.47 req/sec
  • WordPress 4.9.4 + WooCommerce 3.3.1 PHP 7.0 benchmark results: 84.89 req/sec
  • WordPress 4.9.4 + WooCommerce 3.3.1 PHP 7.1 benchmark results: 86.04 req/sec
  • WordPress 4.9.4 + WooCommerce 3.3.1 PHP 7.2 benchmark results: 92.60 req/sec 🏆
  • WordPress 4.9.4 + WooCommerce 3.3.1 HHVM benchmark results: 69.58 req/sec

WooCommerce struggled with HHVM, and PHP 7.2 beat out PHP 7.1 by a small margin.

WordPress 4.9.4 + Easy Digital Downloads 2.8.18

Easy Digital Downloads (EDD), created by Pippin Williamson, is a free WordPress eCommerce plugin that focuses purely on helping creators and developers sell digital products.

Easy Digital Downloads

After seeing how WooCommerce performed, we then took WordPress along with Easy Digital Downloads installed. We utilized the free EDD Starter Theme.

WordPress + Easy Digital Downloads benchmarks

Benchmark Results

  • WordPress 4.9.4 + EDD 2.8.18 PHP 5.6 benchmark results: 76.71 req/sec
  • WordPress 4.9.4 + EDD 2.8.18 PHP 7.0 benchmark results: 123.83 req/sec
  • WordPress 4.9.4 + EDD 2.8.18 PHP 7.1 benchmark results: 124.82 req/sec
  • WordPress 4.9.4 + EDD 2.8.18 PHP 7.2 benchmark results: 135.74 req/sec 🏆
  • WordPress 4.9.4 + EDD 2.8.18 HHVM benchmark results: 127.74 req/sec

PHP 7.2 dominated the tests with WordPress and Easy Digital Downloads.

Drupal 8.4.4

Drupal is an open-source CMS popular for its modular system and strong developer community. It was originally launched in 2000 and according to W3Techs, powers 2.2% of all websites with a 4.4% share of the content management system market.

Drupal

For the Drupal benchmark, we utilized the free Bartik 8.4.4 theme. It’s important to note that Drupal 8.4.x is not compatible with PHP 7.2 (#2932574), therefore that engine wasn’t tested.

Drupal benchmarks

Benchmark Results

  • Drupal 8.4.4 PHP 5.6 benchmark results: 7.05 req/sec
  • Drupal 8.4.4 PHP 7.0 benchmark results: 15.94 req/sec
  • Drupal 8.4.4 PHP 7.1 benchmark results: 19.15 req/sec
  • Drupal 8.4.4 PHP 7.2 benchmark results: (not supported)
  • Drupal 8.4.4 HHVM benchmark results: 19.57 req/sec 🏆

Due to the fact that the latest version of Drupal doesn’t support PHP 7.2, HHVM took the winning spot. Although looking back on performance improvements from previous PHP versions, we can safely assume PHP 7.2 would have probably been even faster!

Joomla! 3.8.5

Joomla! is a free and open source CMS for publishing web content, originally released on August 17, 2005.  It’s built on a model–view–controller web application framework and according to W3Techs is used by 3.1% of all websites on the internet.

Joomla!

For the Joomla! benchmark, we utilized the free Beez3 template.

  • Number of Posts: 4 (default Joomla sample posts added during installation)
  • Default Sidebars are unpublished
  • Docker Image is derived from https://hub.docker.com/_/joomla/
Joomla! benchmarks

Benchmark Results

  • Joomla! 3.8.5 PHP 5.6 benchmark results: 26.42 req/sec
  • Joomla! 3.8.5 PHP 7.0 benchmark results: 41.46 req/sec
  • Joomla! 3.8.5 PHP 7.1 benchmark results: 41.17 req/sec
  • Joomla! 3.8.5 PHP 7.2 benchmark results: 42.36 req/sec
  • Joomla! 3.8.5 HHVM benchmark results: 51.84 req/sec 🏆

On Joomla! we can see a steady progression in performance with each version of PHP. But HHVM still leads the pack.

Magento 2 (CE) 2.1.11 + 2.2.2

Magento is popular open-source e-commerce platform written in PHP and was released on March 31, 2008. According to W3Techs, it powers 1.2% of all websites on the internet.

Magento

For the Magento 2 benchmark, we utilized the free Luma theme. We used two versions due to the fact that 2.1.11 was the only one that supported PHP 5.6. We installed it with the sample data and the default theme that comes with it. For the additional tests, we used 2.2.2. Magento 2 does not support PHP 7.2 yet or the latest version of HHVM.

Magento 2 benchmarks

Benchmark Results

  • Magento 2 (CE) 2.1.11 PHP 5.6 benchmark results: 10.75 req/sec
  • Magento 2 (CE) 2.1.11 PHP 7.0 benchmark results: 20.87 req/sec
  • Magento 2 (CE) 2.1.11 PHP 7.1 benchmark results: 29.84 req/sec 🏆
  • Magento 2 (CE) 2.1.11 PHP 7.2 benchmark results: not supported
  • Magento 2 (CE) 2.1.11 HHVM benchmark results: not supported

Due to the fact that both PHP 7.2 and the latest version of HHVM aren’t supported by Magento 2, PHP 7.1 was the clear winner. It is pretty impressive to see the consistent performance gains through each version.

Grav CMS 1.3.10

Grav is an easy to use, yet powerful, open-source CMS that requires no database. This is also sometimes referred to as a flat-file CMS.

Grav CMS

For the Grav CMS benchmark, we utilized the free Clean Blog skeleton package. It’s important to note that Grav CMS is no longer compatible with HHVM compiler and it has removed the HHVM environment from their Travis build.

Grav CMS benchmarks

Grav CMS benchmarks