Skip to main content

HHVM and Hack on Heroku

By Bruno Skvorc



Free JavaScript Book!

Write powerful, clean and maintainable JavaScript.

RRP $11.95

In a move that surprised most but displeased none, Heroku, the Cloud Application Platform, has added native HHVM support to their cloud.

PHP has long been a viable solution for high traffic production apps, and has had one of the best package managers for a while, not to mention the fact that it’s evolved significantly since the days of “simple hacks for small projects”. The PHP “development model” has been anything but “hackish” in the professional circles for a while now. The unfortunate ignorance of Adam Gross aside, this really is some big news.

HHVM Support

HHVM has been making new forays in popular library and framework compatibility, with the latest update to 3.1 adding full support for Assetic, Composer, Laravel, Monolog, Guzzle, React and more. The team is now refocusing their efforts on getting the open GitHub issues out of the way, particularly those that block people’s deployment, in order to reach an adoption rate that exceeds simple test suite coverage. Previously, Facebook hosted a Hack Developer Day to spread awareness and introduce people to Hack as a viable alternative for their current production environments.

Heroku recognized this potential and bravely dove in head first. If you read my stuff here on SitePoint and elsewhere, you know I’m a sucker for high risk high gain adventures and appreciate such efforts when I see them, so in a community which desperately fears Hack for its future due to its association with Facebook, I was relieved to see a company as strong as Heroku take the lead and push it into production for others.

Switching between the regular PHP and HHVM on Heroku is trivial. The PHP buildpack supports it completely and can be used today, though it’s worth noting we’re dealing with a beta product still.

The new runtime can also take advantage of Heroku XL, designed for super-high traffic apps. Easily scalable with XL, HHVM makes PHP the most logical choice for web apps of the modern era.

To get started with creating your first PHP app, see their simple guide.


This HHVM support at Heroku is more than just switching runtime – it brings with itself the support for Hack, the Super-PHP we’ve covered before. This means you can take advantage of it in production mode today – not having to wait for more widespread adoption.

Hack code gets better with every release and every recompilation, so the resources you’ll save on computing bills will be immense.

If you’d like to share your Hack (on Heroku or otherwise) work with us, let us know. In particular, we’re looking for Vagrant bootstraps in Ubuntu 14.04. that can kickstart HHVM development locally and are immediately prepared to deploy to Heroku as well as soon as the Vagrant Up procedure finishes. For more specific boxes and Vagrant configurations, stay tuned – tutorials and downloads are coming soon, along with sample apps.

Bruno is a blockchain developer and code auditor from Croatia with Master’s Degrees in Computer Science and English Language and Literature. He's been a web developer for 10 years until JavaScript drove him away. He now runs a cryptocurrency business at via which he makes blockchain tech approachable to the masses, and runs Coinvendor, an on-boarding platform for people to easily buy cryptocurrency. He’s also a developer evangelist for, a San Francisco-based AI-powered machine vision web scraper.

New books out now!

Learn how Git works, and how to use it to streamline your workflow!

Google, Netflix and ILM are Python users. Maybe you should too?