Does HHVM (HipHop) support Postgresql/arbitary pecl extensions?
Asked Answered
S

3

7

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?

Salutation answered 29/11, 2012 at 23:37 Comment(1)
Found this: github.com/facebook/hiphop-php/wiki/… ...Salutation
G
13

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.

Gyn answered 30/11, 2012 at 1:1 Comment(1)
Postgres support IS AVAILABLE since end of 2013, pls find my answer below.Prochronism
P
3

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

Prochronism answered 6/5, 2014 at 8:47 Comment(4)
What about PDO's Postgres driver?Jamnis
@FractalizeR, the linked extension provides both ext/pgsql and PDO support.Gyn
@Gyn Yep. But I remember some stability issues in that one. Does it work good now?Jamnis
@FractalizeR, unfortunately I'm just spreading the word that it exists, I haven't used it yet.Gyn
S
1

After some poking around, I found this facebook post which suggests that most libs are still unsupported

HHVM extension status

Salutation answered 29/11, 2012 at 23:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.