Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Home

sgolemon edited this page · 131 revisions
Clone this wiki locally

Inicio (en español)

For the latest news about HipHop for PHP, be sure to like our page on Facebook: https://www.facebook.com/pages/HipHop-for-PHP/282425744325

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 it together with the HipHop 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()).

Why HipHop

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++.

Installing pre-built packages (HPHPc and HHVM delivered together

Prebuilt packages for some distributions are available as shown below:

Building the HipHop static compiler (HPHPc)

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.

See Running HipHop to learn more about compiling your source code.

Building the HipHop virtual machine (HHVM)

Here are some guides for how to get HipHop VM up and running on your distro:

Discussion and support

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

Something went wrong with that request. Please try again.