Skip to content

FAQ

Joel Marcey edited this page Dec 8, 2015 · 51 revisions
Clone this wiki locally

This FAQ is for contributors. The HHVM general and user FAQ are on the official Hack and HHVM docs site.

Contributors

How do I contribute to HHVM?

We are trying to make contributing to HHVM as painless as possible.

What is the HHVM team currently working on?

The HHVM teams is currently working on two primary areas: performance and parity. HHVM performance is a continuous effort given Facebook's scale. Parity and compatibility has become an extremely high priority for the HHVM team. Tactically, parity currently consists of ensuring that HHVM does not fail when running many of the popular PHP frameworks.

I want to port extensions to HHVM. How do I do that?

Where are ported extensions located in the codebase?

Depending on whether the extensions are written in C++ or PHP, ported extensions can be found in /hphp/runtime/ext or hphp/system/php, respectively.

What is the process for committing code to HHVM?

Code is committed to HHVM via pull requests. After you provide a pull request, it gets imported into Phabricator and the HHVM team will review the changes and either accept the diff or ask for further updates or clarifications. Once the pull request is accepted, it is pushed and landed into the HHVM source base.

We are looking to see if it is possible to make this process more direct moving forward.

How do I test code that I write for HHVM?

Tests are written in the same format as Zend PHP.

  • One .php file containing the test (example)
  • One of a .php.expect, .php.expectf, or .php.expectregex file (example)

A test is generally put in the hphp/test/slow directory and run with the test runner script hphp/test/run (e.g., hphp/test/run/ test/slow runs all the tests in the slow directory).

See the test readme for further information.

How to attach GDB to the HHVM Server process?

Prepend gdb --args to your hhvm start command, e.g.

$ gdb --args /usr/local/etc/dev/hhvm/hphp/hhvm/hhvm --mode server -vServer.Type=fastcgi -vServer.Port=9000

Where are the technical specifications for the HHVM runtime (e.g., bytecode spec)?

All of the HHVM technical specifications are located in the hphp/doc directory. Some specifications of interest are:

I need a feature, but don't know how to implement it? What can I do to get this feature into HHVM?

Please submit an issue. HHVM team or someone else might want to implement it, if the feature is reasonable and the implementation is good enough, it could mostly be merged.

Something went wrong with that request. Please try again.