After ongoing rumors of a new version of PHP being released by Facebook today, the company has officially announced HipHop for PHP: a source code transformer. For those who suggested that it was a new compiler, it isn’t exactly that. And no, Facebook has not rewritten PHP all together. While I don’t understand much about the technicalities behind compilers, Haiping Zhao has posted complete details about the project.
ipHop 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.
Get it? Aside from understanding that the eval function will no longer be available, I don’t quite understand the new system. From an engineering perspective, HipHop for PHP is nothing short of phenomenal. Haiping Zhao started off developing the product as a service which could transform PHP code into C++. As he writes, “We knew that it was impossible to successfully rewrite an entire codebase of this size by hand, but wondered what would happen if we built a system to do it programatically.”
The project has taken two years: eight months to have a version that could be demonstrated, ten months finishing up all the coding, and six months testing the service on production servers. This evening the company will be hosting live streamed tech talk to discuss HipHop for PHP and what the project means for developers. If you have a service which handles hundreds of millions of monthly users (not likely) or just have an interest in impressive software engineering feats (more likely), you can tune in via the Facebook blog post.






![[Inside Social Apps 2012]](http://www.allfacebook.com/wordpress/wp-content/themes/allfacebook2/images/ISA2012_336x100_F_RegisterNow.gif)
![[AllFacebook Stats: Facebook Analytics for Your Business]](http://www.allfacebook.com/wordpress/wp-content/themes/allfacebook2/images/stpro_allfacebookstats.gif)
![[How can Facebook change your business?]](http://www.allfacebook.com/wordpress/wp-content/themes/allfacebook2/images/FMB_A_MAY2011_336x100_F.gif)


did you mean "formally?"
Comment by Jen — February 2, 2010 @ 9:19 am
wow… what
Comment by Neil Vidyarthi — February 2, 2010 @ 9:29 am
What an intensely stupid name, really trendy but it appeals to sub literates at best.
Comment by Tupper Lake — February 2, 2010 @ 11:34 pm
Well, this will pretty much be used by … facebook only.
Comment by Derrick — February 3, 2010 @ 5:19 am
"Tupper Lake – February 3rd, 2010 at 3:34 am
What an intensely stupid name, really trendy but it appeals to sub literates at best."
Wow. Can't believe this notion that black music = sub literate genre still exists. I guess it should have been called "Folk Music for PHP"?
Comment by crazzer — February 3, 2010 @ 9:51 am
If eval doesn't work, I wonder if some other features such as calling function names by strings will work.
Comment by Dan Moore — February 7, 2010 @ 8:02 am
What's the benefit?
Comment by Roy — February 7, 2010 @ 8:18 am