Artificial Intelligence

Attack of the PHP clones: Drupal, HHVM, and Vagrant

For those wanting to give it a spin, Metal Toad has added HHVM support to our Vagrant box: github.com/metaltoad/trevor.


Filed under:

For those wanting to give it a spin, Metal Toad has added HHVM support to our Vagrant box: github.com/metaltoad/trevor.

Twenty years after PHP was created, we are on the cusp of having an alternative to the Zend Engine enter the mainstream: Hip Hop Virtual Machine (HHVM, created by Facebook). One of the most interesting things I learned at Drupalcon Austin (hat tip to Josh and David from Pantheon) is that HHVM already passes 100% of the unit tests for many popular apps and frameworks (including Drupal), with more getting closer every day. Considering the substantial speed gains of HHVM's just-in-time compiler, switching will be a big win for many organizations. I was able to roughly halve the response time of this blog with HHVM, similar to results reported by Pantheon.

via GetPantheon / Slideshare

I had hoped to migrate our blog in production, but hit a snag: SimpleXMLIterator is not yet supported in HHVM, and SimpleXML is required for Mollom (our spam filter). Since the HHVM engine is so different, existing Zend extensions such as this cannot be used, and porting them is non-trivial. Hopefully this gap will be filled soon, and we'll re-test.

The development of HHVM has led to another curious contribution: PHP now has a spec!

One side note about benchmarks – I found that HHVM performed worse than Zend when using VirtualBox's shared folder to hold the code. So if you are benchmarking with Vagrant, you should move the code inside the VM's virtual disk first.

Similar posts

Get notified on new marketing insights

Be the first to know about new B2B SaaS Marketing insights to build or refine your marketing function with the tools and knowledge of today’s industry.