I'm wondering, if several engineers spent months porting their php code to hiphop, wouldn't they be better off just rewriting critical parts of their code base to c++?
If HipHop supports 99% of PHP 5.3, then it took them months to change 1% of their code. Changing any more than that would have obviously taken longer, especially to a whole other language.
I would like to elaborate a bit on this. Currently, Hiphop supports 99% of the PHP 5.3 features. When we started working on Hiphop, less was supported.
Stuff like closures, eval(), create_function(), constants with dynamic names (e.g. defining constants from an array) and class destructors were all not supported. Some more subtle stuff: you cannot use current() to get the first element of an array in Hiphop, class_exists() always returns true.
We also had to port our custom PHP extensions.
Finally, we spend a lot of time on related stuff such as precompiling all Smarty templates (so that the generated PHP gets translated to C++ too), using Hiphop's daemon system and setting up compile, build and deploy systems.
We did not measure this separately. With Hiphop, you compile a bunch of PHP files to a binary executable file. Once you have this file, you cannot load any new PHP files like you can with vanilla PHP. So including the Smarty templates is kind of mandatory.