3 ms·
Some details not in the official announcement: Currently works off of the PHP 5.2 language specs Compiles to a stand-alone libevent-driven web server or CLI e
by KrisJordan 17y ago
Some details not in the official announcement:
Currently works off of the PHP 5.2 language specs
Compiles to a stand-alone libevent-driven web server or CLI executable
Not based on Zend's runtime/code
Currently no windows support
Intended for 'drop in' PHP replacement - if it runs on PHP and doesn't use a few things like eval() it will compile with HipHop
- jrockway 17y agoIntended for 'drop in' PHP replacement - if it runs on PHP and doesn't use a few things like eval() it will compile with HipHop This sounds a lot like Python's 2to3. This technique worked so well that the Python 2 series is a distant memory of the past. (Oh wait... the opposite.)
- tlack 17y agoDid they reimplement the entire standard PHP library bug-for-bug in C++? I'm curious about that aspect of it..
- JoachimSchipper 17y agoWhy would they need to do that? The standard library is a mix of PHP, which they can already handle, and C, which doesn't have to be rewritten.
- tlack 17y agoFirst, 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.