PHPackages                             zvax/templating - 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. zvax/templating

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

zvax/templating
===============

a simple php templates parser

2.0.0(3y ago)0247[1 issues](https://github.com/Zvax/templating/issues)[1 PRs](https://github.com/Zvax/templating/pulls)MITPHPPHP &gt;=8.1

Since Oct 7Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Zvax/templating)[ Packagist](https://packagist.org/packages/zvax/templating)[ RSS](/packages/zvax-templating/feed)WikiDiscussions release Synced 4w ago

READMEChangelogDependencies (5)Versions (27)Used By (0)

Templating
==========

[](#templating)

Mostly abandoned project, used for the Renderer interface, and the Twig Adapter so that I can use it in other projects.

The following is still somewhat true.

Simple templates parser engine
------------------------------

[](#simple-templates-parser-engine)

The Engine is the parser, it will regex template strings and replace keys with values

```
$templateString = '{first}{$second}{$obj->third}';
$engine = new Engine();
$obj = new stdClass();
$obj->third = 'sentence.';
$string = $engine->render($templateString,[
	'first' => 'This ',
	'second' => 'is a ',
	'obj' => $obj,
]);
// This is a sentence.
```

there is very basic support for loops:

```
$string = $engine->render('{foreach $posts as $post}{$post}{/foreach}',[
            'posts' => [
                'post1',
                'post2',
            ],
        ]);
// post1post2
```

the posts array must be a 0 indexed container of strings

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity82

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~110 days

Recently: every ~363 days

Total

25

Last Release

1259d ago

Major Versions

0.3.1 → 1.0.02022-05-19

1.1.0 → 2.0.02023-01-19

PHP version history (5 changes)0.0.1PHP &gt;=5.3.0

0.2PHP &gt;=7.0

0.2.2PHP &gt;=5.6

0.3PHP &gt;=7.2

1.0.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/74f374de6f1a1134eaa71027972c09042d0387afc3fd08dceb6ea2a2c3b1b516?d=identicon)[fractal](/maintainers/fractal)

---

Top Contributors

[![Zvax](https://avatars.githubusercontent.com/u/13436253?v=4)](https://github.com/Zvax "Zvax (93 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/zvax-templating/health.svg)

```
[![Health](https://phpackages.com/badges/zvax-templating/health.svg)](https://phpackages.com/packages/zvax-templating)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.0k](/packages/craftcms-cms)[symfony/ux-twig-component

Twig components for Symfony

22018.6M334](/packages/symfony-ux-twig-component)[symfony/ux-live-component

Live components for Symfony

1647.0M123](/packages/symfony-ux-live-component)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
