By Bruno Skvorc

HHVM and Hack on Heroku

By Bruno Skvorc

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.

  • Taylor Ren

    I recall some issues back in early 2013 related to Heroku. Lost track afterwards. Hope that won’t pose any negative impact on this launch and future usage.

  • Oscar Blank

    Your link to the previous article about Hack is broken. 404

  • scamo

    This kind of progress around Hack and HHVM is also something we are watching very, very carefully. Although I am personally totally against the name “Hack”, as I feel PHP really needs to drop its “hackiness” label as a language, what Hack and HHVM represents for the language is a great step in a more modern language direction. I am just wondering if the Facebook developers and the “regular” PHP developers can ever combine forces, and with such powerful synergies, get PHP back to a clear and definitive language of choice for any new web projects. This exact direction is what we at Skooppa have made a big bet on (high risk, high possible gains;)) and such news is always good to hear, because it supports our decision to stick to our guns and PHP.

    Thanks for the article/ headsup.


  • thank you

Get the latest in PHP, once a week, for free.