HHVM or PHP 7 for Drupal 7?

The year 2015 marks a significant milestone for the popular PHP language as it progresses to version 7. Another project, long time in the making is Drupal 8. Drupal 8 will get support for PHP 7 soon enough, but the schedule for support for it in Drupal 7 is still unknown.

For a few years now there has been a viable option for the PHP runtime. This is the HHVM virtual machine from Facebook. It is a credible method for running PHP code, in addition to the separate language known as Hack. PHP 7 improves performance and is in many cases even faster than HHVM. But for Drupal 7 HHVM remains as the best option for performance until the support gets backported from Drupal 8.

PHP 7 improves performance, but also introduces new language features. Some of these are not available in HHVM through PHP, but the Hack language. Hack can be transpiled to PHP, but for projects such as Drupal this is not a viable option. The alternative way is to go forward with PHP compatibility polyfills that enable some features of PHP 7 in HHVM.