We talked quite in detail about the new PHP that Facebook was set to roll out for its developer’s community. While those were just rumors till yesterday, as today the social network confirmed the release of HipHop for PHP. This isn’t any compiler as I had thought of to be but a source code transformer, which turns your PHP into an optimized C++ and later compiles it in the g++ code.
From the post of Haiping Zhao:
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.
The guy has been doing quite some work on the new transformation process and it eases the task of coding by eliminating the hard work of rewriting the entire code base for the platform. Sort of automates the coding process into the newer version. Plus it helps programmers direct both time and energy towards better productivity of any product or idea they need to implement without the need of manually modifying the entire architecture. Plus it adds scalability to Facebook, I mean think of scaling billions of pages each month for the platform, sounds ridiculously impossible.
The gist of the project has been to bring the ease of PHP closer to the complexity in C++. And with the Time Zhao has spent I bet the job has been done well. If you are interested in having a better understanding on this you can head over to the blog post and follow the streaming of the HipHop for PHP streaming that is set to start soon.
Tags: developers, facebook, hiphop php
Previous Post