-
Notifications
You must be signed in to change notification settings - Fork 3k
FAQ
For a history of what is now HHVM, please visit our Wikipedia page
Facebook's entire site runs on HHVM (desktop, api and mobile), both in development and production.
- 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 currently no support for HHVM on Windows.
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 the ARMv8 (AArch64) architecture.
- 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.
- For a discussion about HHVM and its benefits, please see [this PHP UK Conference 2013 presentation] (http://www.youtube.com/watch?v=Dwek7dZDFN0)
- For a deep dive into the HHVM internals, please see this QCon 2012 presentation.
- Other information can be found in the references of our Wikipedia page.
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.
Please note that HHVM is unsupported on 32-bit OSes and there are no current plans to ever add support.
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 aconfig.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.
- 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/hhvm/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.
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.
Please submit an issue.
Other areas for discussion and support are on #hhvm on IRC, HHVM on Facebook
Given our parity work, we hope to be able to run most PHP code by the end of 2013 or Q1 2014.
The list of supported extensions can be found in the extensions directory of the hhvm codebase: https://github.com/facebook/hhvm/tree/master/hphp/runtime/ext
We are trying to make contributing to HHVM as painless as possible.
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.
Depending on whether or the extensions are written in C++ or PHP, ported extensions can be found in
/hphp/runtime/ext
orhphp/system/php
, respectively.
Code is committed to HHVM via pull requests. After you provide a pull request, 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.
Tests are written in the same format as Zend PHP.
A test is generally put in the
hphp/test/[quick | slow]
directory and run with the test runner scripthphp/test/run
(e.g.,hphp/test/run/ test/quick
runs all the tests in the quick directory).
See the test readme for further information.
Prepend
gdb --args
to yourhhvm
start command, e.g.
$ gdb --args /usr/local/etc/dev/hhvm/hphp/hhvm/hhvm --mode server -vServer.Type=fastcgi -vServer.Port=9000
All of the HHVM technical specifications are located in the
hphp/doc
directory. Some specifications of interest are:
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.