PHPackages                             teein/html - 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. [Templating &amp; Views](/categories/templating)
4. /
5. teein/html

AbandonedArchivedLibrary[Templating &amp; Views](/categories/templating)

teein/html
==========

A Virtual DOM and templating engine for PHP

v1.0.1(8y ago)84416[9 issues](https://github.com/Teein/Html/issues)1MITPHPPHP ^7.1

Since Oct 29Pushed 7y ago1 watchersCompare

[ Source](https://github.com/Teein/Html)[ Packagist](https://packagist.org/packages/teein/html)[ RSS](/packages/teein-html/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (2)Dependencies (1)Versions (4)Used By (1)

Teein/Html
==========

[](#teeinhtml)

[![Build Status](https://camo.githubusercontent.com/c5853798806c452fb8e4d2e60c0d9143b8eaa6b66865fe5b6e6f928d2a2a2de8/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f546565696e2f48746d6c2f6261646765732f6275696c642e706e673f623d646576656c6f70)](https://scrutinizer-ci.com/g/Teein/Html/build-status/develop)[![Code Coverage](https://camo.githubusercontent.com/7c7217e28f2e922f0fc59d93a2cb1427423f4a1ccc50bd1cadb56263f9bc2f58/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f546565696e2f48746d6c2f6261646765732f636f7665726167652e706e673f623d646576656c6f70)](https://scrutinizer-ci.com/g/Teein/Html/?branch=develop)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/c27308101d33bbeb89979684d626ad81163c0af151a358a0be27298bc513a739/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f546565696e2f48746d6c2f6261646765732f7175616c6974792d73636f72652e706e673f623d646576656c6f70)](https://scrutinizer-ci.com/g/Teein/Html/?branch=develop)

[![](logo.png)](logo.png)

Teein/Html is a Virtual DOM based templating-engine for PHP inspired by React, XHP and Elm. Here are some highlights:

- **No new syntax to learn** Templates are written in ordinary PHP and they closely resemble the syntax of HTML5.
- **Composable templates** The only way to create templates is to compose them from simpler ones. Composable templates scale with your application without adding to its complexity.
- **Immutable data** Templates are immutable and therefore predictable. Once created you cannot change a template. However, you can always derive a new template from an existing one with a fluent getter/setter-api.
- **Automatic context handling** Forget `htmlspecialchars` and XSS-vulnerabilities, focus on your template, we do the dirty work for you.
- **Minified by default** The HTML5-output is minified by default to reduce network-load. There are no additional tasks or build-steps to configure. Of course, you can always get a beautified output using our `beautify`-function.

Getting Started
---------------

[](#getting-started)

### Requirements

[](#requirements)

Teein/Html requires at least PHP 7.1 and [Composer](https://getcomposer.org/).

### Installation

[](#installation)

When your system satisfies the requirements listed above, you can install Teein/Html by typing:

```
composer require teein/html
```

Hello World
-----------

[](#hello-world)

  Teein/Html HTML5     *Show me the head section of this script*```
