From the ‘Evolution of PHP’ files:
Facebook is a big user of PHP throughout its infrastructure, but they don’t use quite the same same PHP that the rest of us use. A year and a half ago they launched HipHop,their own open source runtime for PHP.
Last week, they officially launched the HipHop virtual machine (hhvm) which will make HipHop PHP execution faster than ever.
All this work on what is kinda/sorta a fork of PHP makes me (and others) wonder, why does Facebook bother? If PHP isn’t up to the task, then why not use a different language?
In a Facebook comment, Facebook engineer Jaap Weel said:
“..when confronted with an enormous existing PHP codebase, it really is a better idea to improve the PHP implementation than to attempt to rewrite the whole thing.”
HipHop isn’t precisely a fork of PHP either – HipHop’s goal isn’t about changing the PHP language itself – it’s all about helping PHP scale.
“There are two different pieces to keep in mind, one is the PHP language itself, then there is the runtime that actually goes and interprets the language and runs it,” David Recordon, Facebook’s senior open programs manager at the time of the original HipHop release told me. “What we’ve done is we’ve implemented the PHP 5.2 language with a few features removed. Our plan is to keep the language the same, but what we’ve changed is the underlying runtime and the process of going and transforming the source code into C++ and then compiling it and pushing out the compiled binary.”
To date, I personally have seen nothing from the HipHop effort land in the broader/general open source PHP community mainline. That said, Facebook is doing most of their code drops in the open on GitHub, so hey php.net devs could take advantage of things if it was possible. That leads me to my next issue, is Facebook so unique an environment that HipHop has no external value?
Facebook’s OpenCompute effort is helping to bring open source ideas to the data center, using Facebook’s own infrastructure as a use case, so why can’t the same hold for PHP?