4 ms·
Whenever we can, we build extensions in PHP https://github.com/facebook/hhvm/tree/master/hphp/system/php https://github.com/facebook/hhvm/tree/master/hphp/syste
by ptarjan 13y ago
Whenever we can, we build extensions in PHP https://github.com/facebook/hhvm/tree/master/hphp/system/php https://github.com/facebook/hhvm/tree/master/hphp/system/php
Many of the older extensions that were imported back in the HPHPc days are in C since they were much easier to port from php-src if we didn't have to translate the language.
As for why this was't in PHP, two reasons. It was easier to stay in the language since our event loop code was already in C++, and most of the gains we get from writing library code in PHP comes from not having to cross a language barrier from userland code. The event loop is not the best place for that.