PHPackages                             rain/raintpl - 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. rain/raintpl

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

rain/raintpl
============

easy and fast template engine

3.1.1(7y ago)253132.5k—9.1%56[32 issues](https://github.com/rainphp/raintpl3/issues)[8 PRs](https://github.com/rainphp/raintpl3/pulls)8MITPHPPHP &gt;=5.3CI failing

Since Dec 24Pushed 3y ago30 watchersCompare

[ Source](https://github.com/rainphp/raintpl3)[ Packagist](https://packagist.org/packages/rain/raintpl)[ Docs](http://raintpl.com)[ RSS](/packages/rain-raintpl/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (20)Used By (8)

RainTPL 3
=========

[](#raintpl-3)

By Federico Ulfo and a lot [awesome contributors](https://github.com/rainphp/raintpl3/network)!

[RainTPL](http://raintpl.com) is an easy template engine for PHP that enables designers and developers to work better together, it loads HTML template to separate the presentation from the logic.

Features
--------

[](#features)

- Easy for designers, only 10 tags, *{$variable}*, *{#constant#}*, *{include}*, *{loop}*, *{if}*, *{* comment *}*, *{noparse}*, *{function}*
- Easy for developers, 5 methods to load and draw templates.
- Powerful, modifier and operation with variables
- Extensible, load plugins and register new tags
- Secure, sandbox with blacklist.

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

[](#installation--usage)

1. Install composer
2. Create a composer.json inside your application folder:

    ```
    {
        "require": {
            "rain/raintpl": ">=3.0.0"
        }
    }
    ```
3. Run the following code

    ```
    $ php composer.phar install
    ```
4. Run one example of RainTPL with your browser: `http://localhost/raintpl3/example.php`

Documentation
-------------

[](#documentation)

The [documentation](https://github.com/rainphp/raintpl3/wiki/Documentation) of RainTPL is divided in [documentation for web designers](https://github.com/rainphp/raintpl3/wiki/Documentation-for-web-designers) and [documentation for PHP developers](https://github.com/rainphp/raintpl3/wiki/Documentation-for-PHP-developers).

Licence
-------

[](#licence)

RainTPL 3, like its antecessor Rain.TPL version 2, is, as of 2018-06-07, published under the MIT Licence.

The above applies to RainTPL 3 itself, not the entire content of this repository. Some of the `example-*.php` files and the content below `templates/` in this repository are copies of external code under various licences, such as:

- Twitter Bootstrap, under the Apache v2 licence
- LESS - Leaner CSS, under the Apache v2 licence

Note that not all external content comes with full source code, it’s usually just a copy of (possibly minified or otherwise modified) parts of their distribution. The example files may be used as starting points without limitation except the licences on the external content.

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity52

Moderate usage in the ecosystem

Community36

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 80.1% 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 ~996 days

Total

3

Last Release

2901d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/656720edc2a59a87d6c196a145ed8b6475b6300e5d627d6bb64111133e4e5931?d=identicon)[RainElemental](/maintainers/RainElemental)

---

Top Contributors

[![feulf](https://avatars.githubusercontent.com/u/540035?v=4)](https://github.com/feulf "feulf (217 commits)")[![Faryshta](https://avatars.githubusercontent.com/u/2029247?v=4)](https://github.com/Faryshta "Faryshta (8 commits)")[![kargnas](https://avatars.githubusercontent.com/u/1438533?v=4)](https://github.com/kargnas "kargnas (8 commits)")[![amunhoz](https://avatars.githubusercontent.com/u/2170321?v=4)](https://github.com/amunhoz "amunhoz (7 commits)")[![suralc](https://avatars.githubusercontent.com/u/730039?v=4)](https://github.com/suralc "suralc (7 commits)")[![aspyatkin](https://avatars.githubusercontent.com/u/4273812?v=4)](https://github.com/aspyatkin "aspyatkin (4 commits)")[![PMickael](https://avatars.githubusercontent.com/u/122271?v=4)](https://github.com/PMickael "PMickael (4 commits)")[![xPaw](https://avatars.githubusercontent.com/u/613331?v=4)](https://github.com/xPaw "xPaw (4 commits)")[![gamma613](https://avatars.githubusercontent.com/u/1322535?v=4)](https://github.com/gamma613 "gamma613 (3 commits)")[![jnerin](https://avatars.githubusercontent.com/u/2012580?v=4)](https://github.com/jnerin "jnerin (2 commits)")[![mirabilos](https://avatars.githubusercontent.com/u/861078?v=4)](https://github.com/mirabilos "mirabilos (1 commits)")[![wu3rstle](https://avatars.githubusercontent.com/u/8260342?v=4)](https://github.com/wu3rstle "wu3rstle (1 commits)")[![aseba](https://avatars.githubusercontent.com/u/443184?v=4)](https://github.com/aseba "aseba (1 commits)")[![smsaladi](https://avatars.githubusercontent.com/u/2942215?v=4)](https://github.com/smsaladi "smsaladi (1 commits)")[![BarryDam](https://avatars.githubusercontent.com/u/4747818?v=4)](https://github.com/BarryDam "BarryDam (1 commits)")[![rafael-fong](https://avatars.githubusercontent.com/u/268718000?v=4)](https://github.com/rafael-fong "rafael-fong (1 commits)")[![Manawyrm](https://avatars.githubusercontent.com/u/748791?v=4)](https://github.com/Manawyrm "Manawyrm (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rain-raintpl/health.svg)

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

###  Alternatives

[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)[nicmart/string-template

StringTemplate is a very simple string template engine for php. I've written it to have a thing like sprintf, but with named and nested substutions.

2101.7M30](/packages/nicmart-string-template)[symfony/ux-icons

Renders local and remote SVG icons in your Twig templates.

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

PHPackages © 2026

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