Setup
XHP provides a native XML-like representation of output.
After adding the required dependencies, read the Introduction.
The XHP-Lib Library
While XHP syntax is a part of the Hack language, implementation is in XHP-Lib, a library that needs to be installed with Composer.
- XHP-Lib includes the base classes and interfaces, and definitions of standard HTML elements.
- Support for namespaced XHP classes (elements like
<p>) is enabled by default since HHVM 4.73.