PHPackages                             mcsodbrenner/serpent - 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. mcsodbrenner/serpent

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

mcsodbrenner/serpent
====================

Serpent is a lightweight and compiling templating engine for PHP. It was designed to seamlessly integrate into existing MVC frameworks. It uses PHP itself as its template language, so you do not need to learn a new markup language. On the other side you get many improvements compared to pure PHP.

2.0.5(12y ago)33291LGPL-3.0PHPPHP &gt;=5.3.0

Since May 23Pushed 12y ago2 watchersCompare

[ Source](https://github.com/McSodbrenner/serpent-php-template-engine)[ Packagist](https://packagist.org/packages/mcsodbrenner/serpent)[ RSS](/packages/mcsodbrenner-serpent/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (6)Used By (1)

### 2013-11-23: Serpent 2.0.0 (the latest and greatest) is now available.

[](#2013-11-23-serpent-200-the-latest-and-greatest-is-now-available)

- made it PSR-0 compatible and Composer friendly () and added an PSR-0 autoloader for people which does not use Composer or an PSR-0 autoloader.
- added specific Exceptions.
- compilers are not longer plugins and not changeable. If you want to integrate other compilers just use mappings.
- resources are not longer plugins and have to be injected with `addResource()`.
- own resources have to implement the interface `\McSodbrenner\Serpent\Resource`.
- in mappings you have now direct access to the parameters via the array `$this->_mapping_parameters`.
- you can add your own mappings via `addMappings()`. Now it is also possible to use anonymous functions.
- changed syntax for block. They are now also mappings, e.g. `~:block('content')~` and `~:endblock()~`.
- new mapping `:loop`. It's like a for loop or a dynamic :repeat.

Serpent is a lightweight, compiling templating engine for PHP.
--------------------------------------------------------------

[](#serpent-is-a-lightweight-compiling-templating-engine-for-php)

It was designed to seamlessly integrate into existing MVC frameworks and uses PHP itself as its template language, so you do not need to learn a new markup language. On the other side you get many improvements compared to pure PHP.

### What it has: ([Overview in Detail &amp; Documentation](https://github.com/McSodbrenner/serpent-php-template-engine/wiki/Overview))

[](#what-it-has-overview-in-detail--documentation)

- PSR-0 and Composer compatible
- short syntax for php tags (shorter than PHPs own short tags wich are also possible)
- no additional markup language
- dot syntax for arrays (like Smarty)
- shortcuts for your own functions
- infinite horizontal and vertical template inheritance
- definable resources
- compiling engine for best performance
- E\_STRICT compatible
- Unit tested

### What it does not have: ([Why it is missing those features](https://github.com/McSodbrenner/serpent-php-template-engine/wiki/MissingDetails))

[](#what-it-does-not-have-why-it-is-missing-those-features)

- template security
- caching system
- overhead

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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 ~0 days

Total

5

Last Release

4421d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1235262f987dbe469bf6f097f4014dd1fcfbd82fac986c46262f5ae1b2391a10?d=identicon)[McSodbrenner](/maintainers/McSodbrenner)

---

Top Contributors

[![McSodbrenner](https://avatars.githubusercontent.com/u/5136288?v=4)](https://github.com/McSodbrenner "McSodbrenner (6 commits)")[![noreply](https://avatars.githubusercontent.com/u/1239515?v=4)](https://github.com/noreply "noreply (6 commits)")

---

Tags

templatetemplatingengine

### Embed Badge

![Health badge](/badges/mcsodbrenner-serpent/health.svg)

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

###  Alternatives

[latte/latte

☕ Latte: the intuitive and fast template engine for those who want the most secure PHP sites. Introduces context-sensitive escaping.

1.3k16.0M750](/packages/latte-latte)[eftec/bladeone

The standalone version Blade Template Engine from Laravel in a single php file

8259.3M103](/packages/eftec-bladeone)[fenom/fenom

Fenom - excellent template engine for PHP

44496.0k23](/packages/fenom-fenom)[duncan3dc/blade

Use Laravel Blade templates without the full Laravel framework

148504.3k25](/packages/duncan3dc-blade)[anourvalar/office

Generate documents from existing Excel &amp; Word templates | Export tables to Excel (Grids)

23991.5k](/packages/anourvalar-office)[templavoilaplus/templavoilaplus

Building kit for custom pages and content elements with individual fields, containers and backend layouts. Supporting drag'n'drop and multiple references.

2538.4k13](/packages/templavoilaplus-templavoilaplus)

PHPackages © 2026

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