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:
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.
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.
- Dennis: Do you have plans for HHVM on OpenShift?
- Paul Tarjan: I haven't used OpenShift before, but if get it working there, please let us know.
- Dean Herbert: I'm always curious when reading the performance comparisons to base php – are you using a bytecode compiler like OpCache in 5.5 for these comparisons? That makes a huge difference.
- Jared Kip: You guys have done really good work on this project. I found a pretty big parity issue in the magic method abilities (vs Zend anyway). http://jaredkipe.com/blog/website-development/silverstripe-on-hhvm-part-two/
- Teng: I made a OpenShift cartridge consisting of HHVM in FastCGI mode and Nginx. Please kindly take a look at it: https://github.com/tengyifei/openshift-cartridge-nginx-hhvm