HHVM provides dozens of built-in, integrated extensions and allows for other extensions to be dynamically loaded. Since this is an HHVM user's guide, this does not discuss how to build your own extension, but there are resources for that listed below.
If you call
get_loaded_extensions() from HHVM, you will find that the following extensions are integrated into HHVM
This documentation links to the PHP documentation about PHP extensions. It is however important to keep in mind that hhvm has been slowly drifting away from PHP. Most extensions have the features that they had in PHP 7.0 or 7.1. Features added in newer releases of PHP may not have been implemented. Some functionality may be missing or may not have typechecker definitions.
Some APIs may have changed (think of
Some functions may have been split up into multiple functions if the PHP function took an optional
For the most up-to-date function signatures, please refer to your version of the typechecker definitions.
- curl (async curl)
- debugger (phpdbg)
- stream (async streams)
To load a dynamically loaded extension, follow the instructions for that extension. However, it generally goes like this:
cd /path/to/extension hphpize cmake . make
This will create an
.so file. Then in your configuration
extension_dir = /etc/hhvm hhvm.extensions[extension_name] = extension.so
hhvm.dynamic_extensions[extension_name] = extension.so
Creating your own extension is beyond the scope of this user guide, but there are some good external resources to help get you started: