1048576.com 2 to the 10th, squared!

2Feb/10Off

Facebook releases HipHop for PHP tonight!

Haiping Zhao posts on developers.facebook.com that the long-awaited HipHop for PHP project will be released as open source tonight.  Here's a description of it in Mr. Zhao's own words:

One of the key values at Facebook is to move fast. For the past six years, we have been able to accomplish a lot thanks to rapid pace of development that PHP offers. As a programming language, PHP is simple. Simple to learn, simple to write, simple to read, and simple to debug. We are able to get new engineers ramped up at Facebook a lot faster with PHP than with other languages, which allows us to innovate faster.

Today I'm excited to share the project a small team of amazing people and I have been working on for the past two years; HipHop for PHP. With HipHop we've reduced the CPU usage on our Web servers on average by about fifty percent, depending on the page. Less CPU means fewer servers, which means less overhead. This project has had a tremendous impact on Facebook. We feel the Web at large can benefit from HipHop, so we are releasing it as open source this evening in hope that it brings a new focus toward scaling large complex websites with PHP. While HipHop has shown us incredible results, it's certainly not complete and you should be comfortable with beta software before trying it out.

HipHop for PHP isn't technically a compiler itself. Rather it is a source code transformer. HipHop programmatically transforms your PHP source code into highly optimized C++ and then uses g++ to compile it. HipHop executes the source code in a semantically equivalent manner and sacrifices some rarely used features — such as eval() — in exchange for improved performance. HipHop includes a code transformer, a reimplementation of PHP's runtime system, and a rewrite of many common PHP Extensions to take advantage of these performance optimizations.

Some interesting facts: the project took nearly two years to come to fruition, and the idea for the project came at a Facebook Hackathon.  PHP creator Rasmus Lerdorf posted this on Twitter today: "HipHop on simpler template-style PHP pages probably isn't going to help you too much. It's not going to make your SQL queries any faster."

Check the original post around 7:30 PM Pacific tonight, Feb 2nd, for the official release.  Presumably, the project will be posted here, the place for all Facebook Open Source projects.