Facebook made a big announcement today -- HHVM is replacing the original hiphop compiler.
The old HipHop had limited support for extensions -- including, IIRC, no postgres support.
Does HHVM support all pecl extensions? How much of the standard PHP library does it support?
What doesn't HHVM support?
In the year since I originally answered this question, things have changed dramatically. HHVM now publishes an extension list. While they don't yet build in support for ext/pgsql
, they point to a this third party extension that implements ext/pgsql
and provides Postgres support for PDO. They now also publish documentation on writing your own extensions.
My original answer is below. Please keep in mind that HHVM has completely superseded HipHop and that links and information below are now out of date.
Does HHVM support all pecl extensions?
All current PHP extensions are inexorably tied to the current PHP codebase, Zend API, and existing PHP VM.
HipHop and HHVM are separate implementations of the PHP language, using different methods to execute PHP code. They do not use the existing PHP codebase, the Zend ZPI, or the PHP VM. Any existing PHP extensions, such as those hosted on PECL, can not be directly ported to HipHop/HHVM.
In reality, it's not so much "porting" of the extension that would need to happen as much as complete ground-up reimplementation. The good news, if there is any, is that many PHP extensions are simply thin veneers over the raw C-level API exposed by whatever library is being turned into an extension. Depending on what the target is, the port may be very easy. On the other hand, not all extensions are wrappers around third party libraries, so YMMV.
How much of the standard PHP library does it support?
It looks like the list of supported extensions can be found in the runtime/ext
directory.
https://github.com/facebook/hiphop-php/tree/master/src/runtime/ext
Looks pretty comprehensive, they even have PDO. No sign of Postgres support though.
One year later - still not soaring like MySql but there seems to be a way according to this official HHVM blog comment reply (from 19th December, 2013)
Jeremy Wilson says: I’d like to see Redis and PostgreSQL support.
(Reply) Simon says: Redis support is already available and there’s a PostgreSQL extension you can use.
...referring to https://github.com/pocketRent/hhvm-pgsql
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With