PHPackages                             kmklabs/xhp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. kmklabs/xhp

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

kmklabs/xhp
===========

Class library for XHP

1.6.2(9y ago)218.1k↓22.2%1BSD-3-ClauseHack

Since Feb 2Pushed 9y ago96 watchersCompare

[ Source](https://github.com/KMK-ONLINE/xhp)[ Packagist](https://packagist.org/packages/kmklabs/xhp)[ Docs](https://github.com/facebook/xhp-lib)[ RSS](/packages/kmklabs-xhp/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

Introduction
============

[](#introduction)

XHP is a PHP extension which augments the syntax of the language such that XML document fragments become valid PHP expressions. This allows you to use PHP as a stricter templating engine and offers much more straightforward implementation of reusable components.

This repository contains the PHP class library, which is required to use XHP both under PHP7. The PHP7 extension is available at

If you want a high-level XHP UI library, you might want to take a look at

Installation
============

[](#installation)

[Composer](https://getcomposer.org/) is the recommended installation method. To add XHP to your project, add the following to your `composer.json` then re-run composer:

```

  "require": {
    "kmklabs/xhp": "1.6.*"
  }

```

Simple Example
==============

[](#simple-example)

```
