Well this evening Facebook have revealed what PHP developers globally have been speculating about and revealed their big secret.
And boy, this could really change the landscape of PHP as we know it. I’m a great fan of compiling PHP for one reason or another, but I’ve never seen it reliably work. Roadsend is an absolutely fabulous rewrite of the Zend engine that allows compilation of PHP. Unfortunately, there are gaps and certain features are missing (but in the pipeline I’m sure). If you want to make a generic website though without any specific extensions, then Roadsend is great and works great with Apache.
I’m really excited to explore HipHop as it claims to be the bee’s knees, and there’s been a lot of hype over it since the announcement. HipHop claims to improve PHP’s performance by fifty percent, which is great. Not only this but it’s clearly proven to be stable as it’s already in use on 90% of Facebook’s platform which means it’s not a lone developer’s work which is tested on his one box; it’s been tested by millions of users.
The great thing about HipHop is that it actually generates C++ code from the PHP, and compiles that normally (using g++ I think). From what I understand, the hardest part (logically) is converting a loosely typed language to a statically typed language. This means that in PHP you would declare a variable without specifying it’s type, in C++ you have to. From what I understand, HipHop parses all the code and attempts to understand all the uses of variables and types them accordingly.
I’m looking forward to seeing HipHop in action and getting stuck in.