Wednesday, February 3rd, 2010
First Thoughts on HipHop for PHP
Yesterday Facebook announced the oncoming release of HipHop for PHP, a PHP to C++ compiler to speed up your PHP application. It's not a new idea to compile a scripting language to a compiler language, but as far as I know, in case of PHP it's the first time anyone has ever tried this.
The source code is not yet available so it's hard to tell if this approach is feasible in real word scenarios. At least Facebook asserts that they use it to serve about 90% of their web traffic.
I assume HipHop will be quite helpful if you're hosting a large and mature PHP application. But please. Before you jump to conclusions that all your scaling problems are now solved, they aren't. Scaling is not only about speeding up the execution of your PHP code, it's also about I/O, network and databases. So, HipHop is one single step, but it's definitely not the Holy Grail. Everyone with some years' experience knows that there is no Holy Grail. At least not in IT.
Some people already complain about the lack of eval() in HipHop, which is obviously impossible to implement in a compiler language. But one the other hand, the same people arguing against the use eval() at all, because it's a potential security risk and also tends to support bad programming style. I don't know, I think I can live easily without eval().
Very curiously looking forward to the public release of HipHop.