in Programming

Facebook Unveils HipHop for PHP

Today, Facebook announced it’s open sourcing a new runtime intended to improve PHP use in large-scale deployments.

In a short summary, as Facebook scaled they encountered problems with PHP, including high CPU and memory costs. Facebook describes HipHop as a “source code transformer”. Basically, HipHop transforms PHP into C++, using g++ to compile it. In their test cases it uses 50% less CPU compared to PHP (with APC). This doesn’t mean pages load faster, it means serving millions of page views requires less servers. It’s being used on 90% of Facebook’s production servers now. HipHop’s got it’s own http server built-in, but they said support for Apache as a web server option is in the works.

You can read Facebook’s full article here.
Brandon Savage has an overview of who benefits from this.