PHPackages                             velliz/pte - 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. velliz/pte

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

velliz/pte
==========

puko template engine

0.2.4(1y ago)320.2k↓44.2%2MITPHP

Since Dec 6Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/Velliz/pte)[ Packagist](https://packagist.org/packages/velliz/pte)[ RSS](/packages/velliz-pte/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)DependenciesVersions (13)Used By (2)

PTE - Puko Templating Engine
============================

[](#pte---puko-templating-engine)

A lightweight, high-performance PHP templating engine designed for standalone use. PTE traverses HTML DOM trees into PHP arrays (lexer) and combines them with data specifications (parser) to render dynamic pages.

Features
--------

[](#features)

- **Fast Rendering** - ~0.004s without cache, ~0.002s with caching
- **Master Pages** - Layout inheritance with `{CONTENT}` placeholder
- **Looping** - Iterate over arrays in templates
- **Custom Functions** - Create reusable parsing rules via `CustomRender` interface
- **Partial Views** - Include external template segments
- **Asset Management** - Automatic CSS/JS aggregation
- **Multiple Output Formats** - HTML, JSON, XML support

Requirements
------------

[](#requirements)

- PHP 5.6+
- Composer
- PHP Extensions: `ext-json`, `ext-xmlrpc`

Installation
------------

[](#installation)

```
composer require velliz/pte
```

Quick Start
-----------

[](#quick-start)

```
