3 ms·
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 l
by willemst 15y ago
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.
- ojilles 15y agoWillem, how much of the performance improvement was related to Smarty templates being compiled to C++ vs. the application itself?
- willemst 15y agoWe 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.
- ojilles 15y agoAha I see. Thnx for the follow up.