PHP 5.6 vs HHVM 3.7 vs PHP 7 Benchmarks

HOSTING

PHP 5.6 vs HHVM 3.7 vs PHP 7 Benchmarks

Find out the results of our PHP 5.6 vs HHVM 3.7 vs PHP 7 Benchmarks tests and which gives better performance.

SiteGround has recently made PHP 7 with OpCache available on all their shared hosting servers. As a result of PHP 7 coming into the mainstream (albeit in Beta), we thought it would be useful to take a look at some benchmarks carried out by Zend. Initial reports suggest PHP 7 is \ will be much faster than HHVM.

Editor's Note: As of 4th December 2015 PHP 7 stable release was launched.

Before you get all excited, though, it must be stressed that PHP 7 is still in beta. As a result, you may find some compatibility issues so you should test it thoroughly before using this on a production (live) website.

HHVM (HipHop Virtual Machine) on the other hand is more stable \ compatible with existing PHP functions. It was initially developed by Facebook to increase PHP performance by using a just-in-time compilation approach.

php 7 logo (imported #28510)The logo to the right is a concept by Vincent Pontier.

PHP 5.6 vs HHVM 3.7 vs PHP 7 Performance Benchmarks

The people at Zend have carried out some benchmark tests on some popular apps, such as WordPress, Magento, and Drupal, to compare PHP 5.6, PHP 7 and HHVM 3.7. The results are impressive:

Magento PHP 5.6 vs HHVM 3.7 vs PHP 7

You can see from the chart below that you can make up to 3 times as many Magento catalog server requests on the same hardware, and interestingly PHP 7 uses 30 percent less memory as well.

Magento PHP 5.6 vs HHVM 3.7 vs PHP 7

Drupal PHP 5.6 vs HHVM 3.7 vs PHP 7

The figures below show the comparison for Drupal using both caching, and no caching. For uncached pages, Drupal 8 runs a massive 72 percent faster with PHP 7 than with PHP 5.6. It also runs significantly faster than HVVM.

Drupal PHP 5.6 vs HHVM 3.7 vs PHP 7

WordPress PHP 5.6 vs HHVM 3.7 vs PHP 7

The results indicate that there is not much difference between HHVM and PHP 3.7. However, one interesting fact is that PHP 7 requires just 25 percent of the server executions to do the same job as PHP 5.6. This will mean that far fewer servers will be needed to serve the same amount of users.

WordPress PHP 5.6 vs HHVM 3.7 vs PHP 7

Caveats to these Tests

The battle between PHP 7 and HHVM has only just begun. These tests use HHVM 3.7, and there are reports that the latest dev version (HHVM 3.8) is 13.9 percent faster than HHVM 3.7.

A comparison for WordPress made by LiteSpeed indicated that the new HHVM 3.8 is slightly faster than PHP 7, although they admit that PHP 7 is 140 percent faster for a simple "hello world" PHP page.

Here are their results when running on OpenLiteSpeed:

PHP 7 vs HHVM Benchmark

Also, Kazanir carried out some benchmarks for Drupal with HHVM 3.7.1 and these also showed HHVM as superior. Here are his results:

Drupal 8 Performance Profiling

As you can see, the benchmark results are not 100 percent clear cut, and will depend on the server configuration, application and version number of HHVM to see which is better.

Either way, it is likely PHP 7 will be better supported in the shared hosting environment longer term with HHVM relegated to Cloud or Dedicated solutions. The fact that significant performance improvements are being made with both solutions is very positive, and of course, a little competition is extremely healthy!

Where can you try out HHVM or PHP 7?

Now we have wet your appetite for some increased website performance; you might want to try either HVVM or PHP 7 out. HHVM is the more stable solution right now, as PHP 7 is still in Beta and some PHP functions have been depreciated.

For HVVM, we recommend the SiteGround Cloud, and for PHP 7 we recommend SiteGround Shared Hosting. HVVM 3.7 (as of the date of this post) is only available with their Cloud and at present PHP 7 only available on their Shared hosting. You can currently get 60 percent off SiteGround Shared Hosting, and 10 percent off their Cloud.

Also, these solutions work well with their SuperCacher, which also incorporates Memcached and NGINX dynamic cache. SiteGround has also implemented HTTP/2 for HTTPS (SSL).

Do you know of any other Benchmark tests that might be useful to our readers?

Let us know in the comments. Note that your comment will not appear automatically if it contains a link, but don't worry, we will read and approve as necessary.

Check out our top user-rated host: SiteGround
Need help choosing a hosting provider?
Check out our top user-rated host: SiteGround