-
Notifications
You must be signed in to change notification settings - Fork 7
Home
The most up-to-date instructions on compiling and building the HipHop Virtual Machine (HHVM) can be found here: Building-and-installing-HHVM-on-Ubuntu-12.04.
HipHop for PHP is a set of PHP execution engines. HipHop was developed by Facebook and was released as open source in early 2010. To date, Facebook has achieved more than a 6x reduction in CPU utilization for the site using HipHop as compared with Apache and Zend PHP.
The HipHop static compiler (HPHPc) works by transforming PHP source code into C++ and then compiling together with a webserver and runtime using g++ to build binary files. HPHPc executes your PHP source code in a semantically equivalent manner but sacrifices some rarely used features – such as eval() – in exchange for improved performance.
The HipHop virtual machine (HHVM) is a newer PHP execution engine that seeks to deliver equal or better performance than HPHPc while still supporting rapid sandbox development and full language support (including eval()).
One of the explicit design goals leading into HipHop was the ability to continue writing complex logic directly within PHP. Companies with large PHP codebases will generally rewrite their complex functionality directly as PHP extensions in either C or C++. Doing so ends up reducing the number of people who are able to work on the company’s entire codebase. By keeping this logic in PHP, Facebook is able to move fast and maintain a high number of engineers who are able to work across the entire codebase.
HipHop is not the right solution for everyone deploying PHP. We think it will be useful to companies running very large PHP infrastructures who do not wish to rewrite complex logic within C or C++.
The HipHop static compiler (HPHPc) works by statically compiling scripts to binary code. While HPHPc is currently the faster HipHop engine, it is less flexible in terms of development.
- Building and installing
- Building and installing on Ubuntu 9.10
- Building and installing on Ubuntu 10.10
- Building and installing on Ubuntu 11.04
- Building and installing on Ubuntu 11.10
- Building and Installing on FreeBSD 8.2
See Running HipHop to learn more about compiling your source code.
Here are some guides for how to get HipHop VM up and running on your distro:
- Building and installing HHVM on Ubuntu 12.04
- Building and installing HHVM on CentOS 6.3
- Mac OSX – Coming Soon
- FreeBSD – Coming Soon
- Other distros: TBD
You can discuss HipHop for PHP and report bugs on the HipHop developer mailing list (or feel free to submit a Pull Request).
The wiki content is licensed under Creative Commons Attribution-ShareAlike License