The Definitive PHP 5.6, 7.0, 7.1, 7.2 & HHVM Benchmarks (2018)

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! 🏆
Click to Tweet

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

We can again see with Grav CMS that the latest version of PHP (7.2) is the clear winner.

October CMS 1.0.433

October CMS is a free, open-source, self-hosted and modular CMS platform based on the Laravel PHP Framework. It was originally released on May 15, 2014.

For the October CMS benchmark, we utilized the free Clean Blog theme. It’s important to note that October CMS is no longer compatible with PHP 5.6 or HHVM. Even though we were able to trick the installer by removing the PHP check, it failed with a 500 error code in the configuration wizard.

Number of Posts: 5 with two sidebars at the left (Recent posts and Follow me)

October CMS benchmarks

Embed on your site:

Benchmark Results

October CMS 1.0.433 PHP 5.6 benchmark results: not supported

October CMS 1.0.433 PHP 7.0 benchmark results: 43.83 req/sec

October CMS 1.0.433 PHP 7.1 benchmark results: 47.95 req/sec

October CMS 1.0.433 PHP 7.2 benchmark results: 48.87 req/sec 🏆

October CMS 1.0.433 HHVM benchmark results: not supported

Even though two of the engines weren’t supported, we can see that PHP 7.2 wins again.

It’s also nice to see these smaller content management systems dropping support for older versions of PHP. Although that is one advantage of not being quite as big either. Unfortunately, when it comes to WordPress and other platforms with a large portion of the market share, things progress more slowly due to compatibility issues.

Laravel 5.4.36 + 5.6

Laravel is a very popular open-source PHP framework used to develop web applications. It was created by Taylor Otwell and was released in June 2011.

For the Laravel benchmark, we used a plain HTML theme. Tests were run multiple times and averages taken. You can see additional details in this spreadsheet.

It’s important to note that Laravel 5.6 is not compatible with HHVMand requires PHP 7.1 or higher.

Laravel 5.6 benchmarks

Embed on your site:

Benchmark Results

Laravel 5.6 PHP 5.6 benchmark results: not supported

Laravel 5.6 PHP 7.0 benchmark results: not supported

Laravel 5.6 PHP 7.1 benchmark results: 411.39 req/sec

Laravel 5.6 PHP 7.2 benchmark results: 442.17 req/sec 🏆

Laravel 5.6 HHVM benchmark results: not supported

If you compare Laravel 5.6 PHP 7.2 benchmarks to those of Laravel 5.4.36 the difference is astounding! Laravel performs really good with the latest versions of PHP.

Symfony 3.3.6 + 4.0.1

Symfony is a set of reusable PHP components and a PHP framework to build web applications, APIs, microservices and web services. It was released on October 22, 2005.

For the Symfony benchmark, we used the Symfony Demo with MySQL (they default to SQLite). Tests were run multiple times and averages taken. It’s important to note that HHVM did not work well and throws a 500 error. You can see additional details in this spreadsheet.

It’s important to note that Symfony 4.0.1 requires PHP 7.1 or higher. And again HHVM did not work well and throws a 500 error

AppCache is not implemented in the main file (index.php) in 4.0.1

Symfony 4.0.1 benchmarks

Embed on your site:

Benchmark Results

Symfony 4.0.1 PHP 5.6 benchmark results: not supported

Symfony 4.0.1 PHP 7.0 benchmark results: not supported

Symfony 4.0.1 PHP 7.1 benchmark results: 188.12 req/sec

Symfony 4.0.1 PHP 7.2 benchmark results: 197.17 req/sec 🏆

Symfony 4.0.1 HHVM benchmark results: not supported

No surprise here, PHP 7.2 is again on top.

PyroCMS 3.4.14

PyroCMS is open source and essentially an extension of Laravel which allows you to build websites and applications on the framework faster.

Struggling with downtime and WordPress problems?

Kinsta provides an all-in-one hosting solution designed to save you time! Let us handle the nitty-gritty stuff (caching, backups, etc.), and you focus on what you do best, which is growing your business.

For the PyroCMS benchmark, we used the free Accelerant Theme (default PyroCMS theme). It’s important to note that PyroCMS doesn’t work in HHVM, possibly due to the dependent on Laravel.

Number of Posts: 5

Debug Mode is On (APP_DEBUG=true)

PyroCMS benchmarks

Embed on your site:

Benchmark Results

PyroCMS 3.4.14 PHP 5.6 benchmark results: not supported

PyroCMS 3.4.14 PHP 7.0 benchmark results: 27.33 req/sec

PyroCMS 3.4.14 PHP 7.1 benchmark results: 27.81 req/sec

PyroCMS 3.4.14 PHP 7.2 benchmark results: 29.28 req/sec 🏆

PyroCMS 3.4.14 HHVM benchmark results: not supported

The results were pretty close with PyroCMS, but PHP 7.2 did once again perform the best.

Pagekit 1.0.13

Pagekit is an open-source modular and lightweight CMS founded by YOOtheme. It gives you the tools to create beautiful websites. It was released in the Spring of 2016.

For the Pagekit benchmark, we used the free One theme (default Pagekit theme).

Number of Posts: 5

Cache is disabled

Tested URL: /blog

Pagekit benchmarks

Embed on your site:

Benchmark Results

Pagekit 1.0.13 PHP 5.6 benchmark results: 51.70 req/sec

Pagekit 1.0.13 PHP 7.0 benchmark results: 108.61 req/sec

Pagekit 1.0.13 PHP 7.1 benchmark results: 112.30 req/sec

Pagekit 1.0.13 PHP 7.2 benchmark results: 116.18 req/sec 🏆

Pagekit 1.0.13 HHVM benchmark results: 61.16 req/sec

Pagekit struggled when running on HHVM. PHP 7.2 clearly dominated again in these tests.

Bolt CMS 3.4.8

Bolt CMS, or Bolt, is an open-source content management tool, which strives to be as simple and straightforward as possible. It is based on Silex and Symfony components, uses Twig and either SQLite, MySQL or PostgreSQL.

For the Bolt CMS benchmark, we used the free Bolt Base 2016 theme. It’s important to note that HHVM is not supported (#6921).

Number of Posts: 5

Tested URL: /entries

Session is still enabled

Bolt CMS benchmarks

Embed on your site:

Benchmark Results

Bolt CMS 3.4.8 PHP 5.6 benchmark results: 33.45 req/sec

Bolt CMS 3.4.8 PHP 7.0 benchmark results: 60.21 req/sec

Bolt CMS 3.4.8 PHP 7.1 benchmark results: 67.96 req/sec

Bolt CMS 3.4.8 PHP 7.2 benchmark results: 72.05 req/sec 🏆

Bolt CMS 3.4.8 HHVM benchmark results: not supported

We can see a clear indicator here that with each new release of PHP the Bolt CMS saw consistent performance gains.

Anchor CMS 0.12.6 (pre-release)

Anchor is a super-simple, open-source and lightweight blog system, made to let you just write.

For the Anchor CMS benchmark, we used the free Default Theme by Visual Idiot.

Number of Posts: 5

Anchor CMS benchmarks

Embed on your site:

Benchmark Results

Anchor CMS 0.12.6 PHP 5.6 benchmark results: 495.33 req/sec

Anchor CMS 0.12.6 PHP 7.0 benchmark results: 546.02 req/sec

Anchor CMS 0.12.6 PHP 7.1 benchmark results: 565.00 req/sec 🏆

Anchor CMS 0.12.6 PHP 7.2 benchmark results: 561.73 req/sec

Anchor CMS 0.12.6 HHVM benchmark results: 487.71 req/sec

The results were very close between PHP 7.1 and PHP 7.2. But PHP 7.1 saw slightly faster performance in our tests.

PrestaShop 1.7.2.4

PrestaShop is a popular and very fast growing open-source eCommerce solution. It was originally released on July 31, 2008, and according to W3Techs is used by 0.6% of all websites on the internet.

CraftCMS comes with its own Dockerfile. We customize it a bit to be compatible with Nginx.

Craft CMS benchmarks

Embed on your site:

Benchmark Results

Craft CMS 2.6.3011 PHP 5.6 benchmark results: 131.04 req/sec

Craft CMS 2.6.3011 PHP 7.0 benchmark results: 266.54 req/sec

Craft CMS 2.6.3011 PHP 7.1 benchmark results: 272.14 req/sec

Craft CMS 2.6.3011 PHP 7.2 benchmark results: 280.02 req/sec 🏆

Craft CMS 2.6.3011 HHVM benchmark results: 26.28 req/sec

Craft CMS did not perform well for us on HHVM. But PHP 7.2 again was blazing fast!

Fork CMS 5.2.2

Fork is an easy to use open-source CMS using Symfony Components. For the Fork CMS benchmark, we used the free default Fork Theme. It’s important to note that Fork CMS requires PHP 7.1 or higher and doesn’t support HHVM.

Number of Posts: 2 (Default sample data from ForkCMS)

Tested URL: /modules/blog

Fork CMS benchmarks

Embed on your site:

Benchmark Results

Fork CMS 5.2.2 PHP 5.6 benchmark results: not supported

Fork CMS 5.2.2 PHP 7.0 benchmark results: not supported

Fork CMS 5.2.2 PHP 7.1 benchmark results: 10.68 req/sec

Fork CMS 5.2.2 PHP 7.2 benchmark results: 12.83 req/sec 🏆

Fork CMS 5.2.2 HHVM benchmark results: not supported

PHP 7.2 beat out PHP 7.1 in terms of performance.

Upgrade to PHP 7.2 or PHP 7.3 Now at Kinsta

If the results above don’t convince you, we aren’t sure what will! Just a friendly reminder. If you’re a Kinsta client, we released PHP 7.2 back in December 2017, as well as PHP 7.3-RC4 in October 2018. If you’re wanting to see performance improvements, you can easily change to PHP 7.2 or PHP 7.3 with a single click in your MyKinsta dashboard.

Change to PHP 7.3 RC 4

If you are worried about it being incompatible with a third-party plugin (which can happen), this is exactly why we have staging sites. 👍 You can test away without worrying about breaking your production site.

Takeaway From Benchmark Results

As you can clearly see from the tests above, PHP 7.2 is leading the pack when it comes to performance across all platforms. 👏

PHP 7.2 was the fastest engine in 14 out of the 20 configurations tested above. And two of these (Drupal and Magento) don’t support PHP 7.2 yet, so it could be as high as 16/20.

As far as WordPress is concerned, PHP 7.2 was the fastest in all tests (stock WordPress site, WooCommerce, and Easy Digital Downloads).

In many of the benchmark results, you can easily spot a pattern of increased performance with each new version of PHP that is released. This is why it’s so important to test your site, plugins, etc. and stick to a regular upgrade schedule. Your visitors and customers will thank you as they expect speed!

For WordPress users besides upgrading to the latest PHP version, we collected a lot more techniques which can help you to further improve website performance. See the details in this in-depth guide How to Speed up Your WordPress Site (Ultimate Guide)

We are super excited about PHP 7.2 and PHP 7.3, and hope you are too! We would love to hear your thoughts regarding our benchmarks or even experiences you’ve had once upgrading. Drop them below in the comments.

If you enjoyed this article, then you'll love Kinsta’s WordPress hosting platform. Turbocharge your website and get 24x7 support from our veteran WordPress team. Our Google Cloud powered infrastructure focuses on auto-scaling, performance, and security. Let us show you the Kinsta difference! Check out our plans

Hand-picked related articles

Comments

Comment policy: We love comments and appreciate the time that readers spend to share ideas and give feedback. However, all comments are manually moderated and those deemed to be spam or solely promotional will be deleted.

Sascha Grossenbacher
February 27, 2018 at 10:13 am

Drupal 8.5.0 now has a release candidate and will be stable in a few days. Would be nice to use that so it can be tested with 7.2.

Thanks for those benchmarks interesting to see how various CMSes performed pure PHP wise compared to WordPress. Some CMS’s pure PHP performance was way down at the bottom! CraftCMS and AnchoreCMS look interesting that pure PHP performance perspective.

I’d love to have seen the Drupal stuff with the page caching on. Not because I want to see it looking faster, but to see how it performs in a real world situation with those various PHP versions. Drupal has a “cache the caching caches” strategy.

Follow us

A cookie is a piece of information that a website stores on a visitor’s computer. We use this for some functionality on our website to work properly, collecting analytics to understand and improve a visitor’s experience, and for personalized advertising. You can accept all cookies at once or fine-tune your preferences in the cookie settings.

Cookie settings

Accept cookies

Thanks, we've saved your settings, you can modify them any time on the cookie settings page

Cookie settings

Necessary cookies

Details

These cookies are needed for our website to function providing payment gateway security and other essentials. Therefore they are always on but they do not contain personally identifiable information (PII).

Name

Purpose

Cookie Settings

If you've set preferences (which cookies you accept and which you don't) we store your preferences here to make sure we don't load anything that you didn't agree to.

WordPress Cookies

WordPress sets a couple of cookies that track logged in users and store user preferences set in their WordPress user profile. These are set for members of the Kinsta website only - members of our staff.

Stripe

Stripe is our payment provider and they may set some cookies to help them with fraud prevention and other issues. This is required for our payments to work.

Affiliate cookie

This cookie contains information about the affiliate who refered a visitor. The cookie contains no information about the visitor whatsoever.

Google Analytics

Analytics help us deliver better content to our audience. We have made sure no personally identifiable information (PII) is sent by anonymizing IPs.

Newsletter Participation

If you sign up for our newsletter we'll remove the newsletter subscription box for you. This cookie has not personal data it just indicates if you have signed up.

Analytics cookies

Details

Analytics cookies allow us to gather data to help us better understand our visitors and offer them a better experience.

Select

Provider

Purpose

Google Optimize

Set and used by Google. It allows us to A/B test our content to make sure we're providing visitors with what they need most.

Marketing cookies

Details

Marketing cookies help us target our ads better. We mainly use them to target ads to users who have visited Kinsta.

Select

Provider

Purpose

Twitter

Set and used by Twitter, used for targeting advertisements and promoting content to users who have visited kinsta.com.

LinkedIn

Set and used by LinkedIn, used for targeting advertisements and promoting content to users who have visited kinsta.com.

Facebook

Set and used by Facebook, used for targeting advertisements and promoting content to users who have visited kinsta.com.

AdWords

Set and used by Google Ads for remarketing, personalization, and targeting advertisements to users who have visited kinsta.com. (Google Ads Settings)

Bing

Set and used by Bing Ads for remarketing, personalization, and targeting advertisements to users who have visited kinsta.com. (Bing Ads Settings)

Quora

Set and used by Quora, used for targeting advertisements to users who have visited kinsta.com.