HHVM: Upgrading PHP for Fun and Performance

Kazanir

HHVM is the new PHP runtime developed by Facebook. A drop-in replacement for the PHP interpreter engine (i.e. for mod_php or php-fpm), HHVM improves dramatically on PHP's performance and scalability. The HHVM team is focused on making sure it is compatible with all major open source PHP frameworks and they have devoted a lot of resources to interoperability and performance testing over the past 2  years. This has big implications for Drupal developers in charge of deployments with serious performance requirements -- under load, HHVM scales much better than PHP (even PHP 7!) and can results in performance improvements of anywhere from 100% to 300%. (For example, one particular feature of HHVM eliminates the entirety of Drupal 8's autoloader overhead.)

For any PHP developer, using HHVM opens up additional language features: static return types, function type hinting and generics, constructor argument promotion, native collections and enums, async functionality, and more. Collectively known as "Hack" or "Hacklang", this new dialect of PHP opens up many new features and improves developer productivity by integrating the type-checker with developer IDEs.

This talk will cover:

  • Where HHVM is today in terms of performance and framework interoperability
  • What's different in HHVM from standard PHP
  • Switching to HHVM and tuning for performance
  • Awesome new language features HHVM adds to PHP
  • Upgrading existing PHP code to take advantage of HHVM's new stuff

Session Track

PHP

Experience Level

Intermediate

Drupal Version