4 ms·
First, they didn't call the PHP standard library: the poster of the root comment we are replying to has stated they didn't use the Zend runtime or code. The PH
by tlack 17y ago
First, they didn't call the PHP standard library: the poster of the root comment we are replying to has stated they didn't use the Zend runtime or code.
The PHP standard library has a huge number of functions that are mostly useless permutations of one another. As opposed to, say, Erlang's meager but usable lists and string module, PHP has such high-level meta-randomness as stristr() (case-insensitive search), str_word_count(), and str_shuffle(). So if you were going to convert that directly to C++, there wouldn't necessarily be a direct replacement in strings.h. Therefore I'd guess they either have to reimplement all of those in PHP, and compile that to C++, or write them in C++. Furthermore, some of these functions have unusual quirks, so some kind of framework would be required I think.
- JoachimSchipper 17y agoI'm sorry, that's indeed what the root comment said. Thanks for the correction. Still, I imagine they must use a lot of the same code - half the PHP standard library is just a thin wrapper of some C library, and reimplementing all of them sounds stupid. Then again, they may just not support the majority of such libraries.