Do you use heroku to host your PHP app and want to save 2x-10x dynos? Or serve user requests 2x-10x faster? I’m happy to announce that you can now use HHVM on heroku. You should clone your app and try it out before pushing to production as HHVM doesn’t support every possible use of PHP (yet).

To use it with a new app:

1 heroku create --buildpack https://github.com/hhvm/heroku-buildpack-hhvm

Or to convert your existing PHP app (once you tested it works on HHVM):

1 2 3 heroku config:set BUILDPACK_URL=https://github.com/hhvm/heroku-buildpack-hhvm <make some git change and commit it> git push

The hardest part of this whole endeavor was getting HHVM to compile on Ubuntu 10.04, but once that worked it was smooth sailing. If you want to dive into the nitty gritty details you can read the source.

A huge thanks to @pvh for hosting us at heroku and hacking on this for a day. And to Claudiu Ceia for writing the .hdf linter and all his work throughout this project.

If you have any issues with the heroku part, open issues on the heroku buildpack issue tracker and if you have any issues with HHVM running your code open issues on the HHVM issue tracker. And if you can make this integration better in any way, please fork and send pull requests.

Comments