PHPackages                             sluz/sluz - 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. sluz/sluz

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

sluz/sluz
=========

Sluz is a minimalistic PHP templating engine with an emphasis on syntax similar to Smarty.

v0.9.1(1mo ago)2141GPL-3.0-or-laterPHPPHP &gt;=8.0

Since May 4Pushed 1mo ago2 watchersCompare

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

READMEChangelog (10)DependenciesVersions (3)Used By (0)

📰 Sluz PHP templating system
============================

[](#-sluz-php-templating-system)

Sluz is a minimalistic PHP templating engine with an emphasis on syntax similar to [Smarty](https://www.smarty.net/). This allows you to separate your logic (`.php`) and your presentation (`.stpl`) files.

The goal of Sluz is to be a **small**, single PHP source file, that emulates simple Smarty-like syntax.

📦 Getting started
-----------------

[](#-getting-started)

File: `script.php`

```
include('/path/to/sluz/sluz.class.php');
$s = new sluz();

$s->assign("name", "Jason");
$s->assign("version", "0.3");

print $s->fetch("tpls/script.stpl");
```

File: `tpls/script.stpl`

```
Hello {$name}

Welcome to Sluz version: {$version}

```

🤵 Composer
----------

[](#-composer)

If you are a composer user you can install Sluz with this command:

```
composer require sluz/sluz

```

📐 Requirements
--------------

[](#-requirements)

Sluz requires PHP 8.0+, and is a zero-dependency library. **Only** the `sluz.class.php` file is needed for the library to function.

🥽 Testing
---------

[](#-testing)

Sluz has an extensive test suite that is used to verify compatibility across PHP versions. As of this writing Sluz passes all unit tests on PHP versions: 8.0, 8.1, 8.2, 8.3, 8.4, and 8.5.

To run the tests issue this command at the CLI:

```
php unit_tests/tests.php

```

**Note:** Care was take to ensure that no `E_NOTICE` warnings are emitted to insure Sluz is `error_reporting(E_ALL)` compliant.

📖 Documentation
---------------

[](#-documentation)

There is extensive documentation in the `docs/` with real world examples of the syntax.

🔤 Naming
--------

[](#-naming)

Sluz is pronounced "sloos". The name comes from the "S" in Smarty and "luz" which is Spanish for light. Sluz is a lite, Smarty-like templating system.

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance93

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity29

Early-stage or recently created project

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

Total

2

Last Release

36d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9abab1acc5a8df8723cc365fc7cbc437bb9844fd9f0b9d0a8950925b1ae2ff4d?d=identicon)[scottchiefbaker](/maintainers/scottchiefbaker)

---

Top Contributors

[![scottchiefbaker](https://avatars.githubusercontent.com/u/3429760?v=4)](https://github.com/scottchiefbaker "scottchiefbaker (395 commits)")

---

Tags

phptemplatetemplatingsmartyengine

### Embed Badge

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

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

###  Alternatives

[eftec/bladeone

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

8259.3M102](/packages/eftec-bladeone)

PHPackages © 2026

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