Skip to content
Joel Marcey edited this page Oct 9, 2013 · 51 revisions

General

What is the history of HHVM?

For a history of what is now HHVM, please visit our Wikipedia page

How does Facebook use and run HHVM?

Facebook's entire desktop site runs on HHVM, both in development and production.

What platforms is HHVM supported on?

  • Linux: HHVM has broad support on various flavors of Linux (Ubuntu, Debian, CentOS)
  • Mac OS X: HHVM has some support for Mac OS X. It runs in interpreted mode only right now (no JITted code).
  • Windows: There is no support for HHVM on Windows currently.

What is the roadmap for HHVM?

We are always working to increase the performance of HHVM. That is a continuous effort on the HHVM roadmap.

We are also always working to ensure that we engage with the HHVM community as much as possible, and make it even easier for the community to engage with us. We take that relationship very seriously.

However, beyond performance and community, the team has established goals to ensure that HHVM is a first class runtime for PHP.

  • Enhance Underlying HHVM Infastructure

  • Support for Apache web server.

  • Support for php.ini and associated options.

  • Streamlining the installation process.

  • Support for ARM.

  • Parity

  • Ensuring HHVM passes all unit tests for the top 20-30 PHP Frameworks.

  • Continuing adding missing functionality and extensions so that more PHP code runs.

  • Fixing bugs.

  • HHVM in the Real World

  • Run the top 20-30 PHP Frameworks in real world scenarios.

  • First-class documentation around HHVM.

  • Super easy install on as many distributions as possible.

Are there are any videos, presentations, etc. about HHVM?

Users

How do I install HHVM? Where are the binaries?

On various flavors of Linux, HHVM can be installed from pre-packaged binaries or built from the HHVM source code. The pre-packaged binaries can be behind the source code builds in terms of functionality and bug fixes on the order of weeks.

HHVM on Mac OS X can currently only be built from the source code.

How do I configure HHVM? What are my options?

Many times, HHVM can be run directly from the command line without any additional configuration: hhvm file.php or, for a server, sudo hhvm -m server.

However, we understand that more fine tuned configuration may be necessary, particularly in server mode.

HHVM allows for many runtime option variations. For some configuration options, they can be set at the command line (e.g., hhvm -m server -v Log.Level=Error). However, many times you will use a config.hdf file and run HHVM with a command similar to: hhvm -m server -c config.hdf.

For other options that can be given to HHVM, type hhvm --help at the command line.

What code does HHVM currently run?

  • Facebook: HHVM runs Facebook.com in production.
  • Wordpress: hhvm.com, a Wordpress blog, is running on HHVM.
  • Mediawiki: Mediawiki installations can run on HHVM.

Here are some other places HHVM is being used: https://github.com/facebook/hiphop-php/wiki/Users

The HHVM team is on a big push towards parity. We are pushing very hard to pass the unit tests for the most popular PHP frameworks. This work will hopefully allow enough new functionality to be implemented, as well as bugs to be fixed, in order to run most of the PHP code out in the wild.

What is known to be broken with HHVM?

There are definitely issues that need to be addressed with HHVM. We have many instances where HHVM fatals when running unit tests for popular PHP frameworks.

Also, the HHVM GitHub issues describe bugs that exist with the current implementation.

The HHVM team is working really hard to enhance functionality and fix bugs that currently exist.

What do I do if I run into a problem (e.g., an error, fatal or segfault)?

Please submit an issue.

Other areas for discussion and support are on #hhvm on IRC, HHVM on Facebook

When is HHVM going to run my code?

Given our parity work, we hope to be able to run most PHP code by the end of 2013 or Q1 2014.

When will HHVM support Apache?

Our goal is to support Apache by the end of 2013.

What PHP extensions does HHVM currently support?

The list of supported extensions can be found in the extensions directory of the hhvm codebase: https://github.com/facebook/hiphop-php/tree/master/hphp/runtime/ext

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 or 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, the HHVM 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/[quick | slow] directory and run with the test runner script hphp/test/run (e.g., hphp/test/run/ test/quick runs all the tests in the quick directory).

See the test readme for further information.

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?

Clone this wiki locally