PHPackages                             shusaura85/mythtpl - 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. shusaura85/mythtpl

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

shusaura85/mythtpl
==================

Easy to use template system for PHP

1.0.5(11mo ago)6112[2 issues](https://github.com/shusaura85/mythtpl/issues)MITPHPPHP &gt;=7.4

Since May 2Pushed 11mo ago1 watchersCompare

[ Source](https://github.com/shusaura85/mythtpl)[ Packagist](https://packagist.org/packages/shusaura85/mythtpl)[ Docs](https://github.com/shusaura85/mythtpl)[ RSS](/packages/shusaura85-mythtpl/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (1)Versions (6)Used By (0)

MythTPL
=======

[](#mythtpl)

By Shu Saura
Based on RainTPL 3 by Federico Ulfo

[MythTPL](https://github.com/shusaura85/mythtpl) is an easy template engine for PHP that allows easy separation of the presentation from the logic.

Features
--------

[](#features)

- Simple syntax
- Easy to use
- Fast, templates are compiled to plain PHP code
- Powerful, modifiers and operations with variables
- Extensible, you can register new tags

Supported tags
--------------

[](#supported-tags)

- {$variable} to include a variable in the template
- {#CONSTANT} or {#'string'} to include a constant or string
- {do $variable} to do an assignment. ex: {do $x = 2} / {do $x += 5} / etc. Any operations that don't require echo-ing the value.
- {if} for conditional blocks
- {loop} to loop over arrays
- {include} to include another template
- {ignore} to add private comments in the template
- {noparse} to not process tags contained inside
- {function} to run a PHP function
- {php} if you really must use PHP inside your templates (disabled by default in configuration)
- {autoescape} to automatically escape all tag values inside
- {elseif} {else} {break} {continue} to use with conditional or looping tags
- {t} to include a component. Similar to {include} but it can be configured with attributes ({t="component" attr="value" attr2="value2" ...}). Attributes are available in the included component inside $tdata variable as array. Component templates are stored separate from standard template files.

Installation / Usage
--------------------

[](#installation--usage)

- Using **Composer**

    ```
    composer require shusaura85/mythtpl
    ```
- Manually

    ```
    require '/path/to/src/autoload.php'
    ```

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

[](#requirements)

MythTPL requires at least `PHP 7.4` to work. MythTPL has no external dependencies.

Differences compared to Rain TPL 3
----------------------------------

[](#differences-compared-to-rain-tpl-3)

- Dropped plugin support
- Dropped function blacklist
- assign() now accepts only arrays (use assign\_var() to set a single value)
- Configuration is no longer static, you can now configure with constructor or dedicated configuration functions
- Added reset() function to clear assigned values
- Added p\_assign() function to assign values that are not cleared with reset()

Licence
-------

[](#licence)

MythTPL is published under the MIT Licence, see `LICENSE` file for details.

###  Health Score

32

—

LowBetter than 71% of packages

Maintenance47

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 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 ~279 days

Total

5

Last Release

350d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0e7d0a1ba044084f63377918761d8eef4055af759f1d78cb1ad3ed62805d20ee?d=identicon)[shusaura85](/maintainers/shusaura85)

---

Top Contributors

[![shusaura85](https://avatars.githubusercontent.com/u/35106430?v=4)](https://github.com/shusaura85 "shusaura85 (45 commits)")

---

Tags

phpphp-libraryphp7raintpltemplate-engine

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/shusaura85-mythtpl/health.svg)

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

###  Alternatives

[mustache/mustache

A Mustache implementation in PHP.

3.3k44.6M291](/packages/mustache-mustache)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[whitecube/nova-flexible-content

Flexible Content &amp; Repeater Fields for Laravel Nova.

8053.0M25](/packages/whitecube-nova-flexible-content)[mopa/bootstrap-bundle

Easy integration of twitters bootstrap into symfony2

7042.9M33](/packages/mopa-bootstrap-bundle)[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3871.2M](/packages/limenius-react-bundle)[symfony/ux-icons

Renders local and remote SVG icons in your Twig templates.

545.8M69](/packages/symfony-ux-icons)

PHPackages © 2026

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