PHPackages                             g737a6b/php-r2-template - 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. g737a6b/php-r2-template

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

g737a6b/php-r2-template
=======================

PHP template library.

1.4.0(4mo ago)0432MITPHPPHP &gt;=8.3CI failing

Since Dec 1Pushed 4mo ago1 watchersCompare

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

READMEChangelog (6)Dependencies (2)Versions (14)Used By (0)

R2Template [![main](https://github.com/g737a6b/php-r2-template/workflows/main/badge.svg)](https://github.com/g737a6b/php-r2-template/workflows/main/badge.svg)
==============================================================================================================================================================

[](#r2template-)

PHP template library.

Usage Examples
--------------

[](#usage-examples)

```
$R2Template = new R2Template\R2Template("./templates");
$R2Template->set("var1", "foo");
$R2Template->set("var2", "bar");
$R2Template->display("echo_vars.php"); // foo bar
```

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

[](#installation)

### Composer

[](#composer)

Add a dependency to your project's `composer.json` file.

```
{
	"require": {
		"g737a6b/php-r2-template": "*"
	}
}
```

Development
-----------

[](#development)

### Install dependencies

[](#install-dependencies)

```
docker run -it --rm -v $(pwd):/app composer:2.9.2 install
```

### Run tests

[](#run-tests)

```
docker run -it --rm -v $(pwd):/app -w /app php:8.5 ./vendor/bin/phpunit ./tests
```

### Format code

[](#format-code)

```
docker run -it --rm -v $(pwd):/app -w /app php:8.3 ./vendor/bin/php-cs-fixer fix ./src
```

License
-------

[](#license)

[The MIT License](http://opensource.org/licenses/MIT)

Copyright (c) 2017-2026 [Hiroyuki Suzuki](https://mofg-in-progress.com)

###  Health Score

51

—

FairBetter than 96% of packages

Maintenance82

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity85

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

Recently: every ~253 days

Total

13

Last Release

127d ago

PHP version history (3 changes)1.3.1PHP &gt;=7.1

1.3.2PHP &gt;=7.4

1.4.0PHP &gt;=8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/07d4fb20a844e6640ff3f2c66acfbd7b32131a0720787ee864d1cef9883fba0e?d=identicon)[g737a6b](/maintainers/g737a6b)

---

Top Contributors

[![g737a6b](https://avatars.githubusercontent.com/u/10450063?v=4)](https://github.com/g737a6b "g737a6b (51 commits)")

---

Tags

composerlibraryphptemplatetemplate

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/g737a6b-php-r2-template/health.svg)

```
[![Health](https://phpackages.com/badges/g737a6b-php-r2-template/health.svg)](https://phpackages.com/packages/g737a6b-php-r2-template)
```

###  Alternatives

[phpoffice/phpword

PHPWord - A pure PHP library for reading and writing word processing documents (OOXML, ODF, RTF, HTML, PDF)

7.5k34.7M182](/packages/phpoffice-phpword)[rize/uri-template

PHP URI Template (RFC 6570) supports both expansion &amp; extraction

420137.3M46](/packages/rize-uri-template)[mopa/bootstrap-sandbox-bundle

Seperate live docs from code

256.8k](/packages/mopa-bootstrap-sandbox-bundle)[larablocks/pigeon

A more flexible email message builder for Laravel 5 including chained methods, reusable message configurations, and message layout and template view management.

143.7k](/packages/larablocks-pigeon)

PHPackages © 2026

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