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

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

fenom/fenom
===========

Fenom - excellent template engine for PHP

v3.0.0(3y ago)44395.5k↓50%106[21 issues](https://github.com/fenom-template/fenom/issues)[7 PRs](https://github.com/fenom-template/fenom/pulls)19BSD-3-ClausePHPPHP &gt;=8.0.0CI passing

Since Apr 9Pushed 3mo ago45 watchersCompare

[ Source](https://github.com/fenom-template/fenom)[ Packagist](https://packagist.org/packages/fenom/fenom)[ RSS](/packages/fenom-fenom/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (41)Used By (19)Security (1)

MAINTAINERS WANTED
==================

[](#maintainers-wanted)

Create issue if you want to be a maintainer of Fenom

Fenom - Template Engine for PHP
===============================

[](#fenom---template-engine-for-php)

**Fenóm** - lightweight and fast template engine for PHP.

- **Subject:** Template engine
- **Syntax:** Smarty-like
- **Documentation:** **[English](./docs/en/readme.md)**, **[Russian](./docs/ru/readme.md)**
- **PHP version:** 8.0+
- **State:** [![PHP Composer](https://github.com/fenom-template/fenom/actions/workflows/php.yml/badge.svg?branch=master)](https://github.com/fenom-template/fenom/actions/workflows/php.yml) [![Coverage Status](https://camo.githubusercontent.com/971d7d3d0a8515439670973ac8ef96ce1590e2aed5a2e8593ad8f4c2dcf58eda/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f66656e6f6d2d74656d706c6174652f66656e6f6d2f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/r/fenom-template/fenom?branch=master)
- **Version:** [![Latest Stable Version](https://camo.githubusercontent.com/d05b64fbd8e9f4ec6619ebd8ffa2dcf1b466135dc9678116fb8cb3561ed95e94/68747470733a2f2f706f7365722e707567782e6f72672f66656e6f6d2f66656e6f6d2f762f737461626c652e706e67)](https://packagist.org/packages/fenom/fenom)
- **Packagist:** [fenom/fenom](https://packagist.org/packages/fenom/fenom) [![Total Downloads](https://camo.githubusercontent.com/07186a9e27db64c123d0bc5dd3ccf34d823354c7983f4730d9893d06fd19a70d/68747470733a2f2f706f7365722e707567782e6f72672f66656e6f6d2f66656e6f6d2f646f776e6c6f6164732e706e67)](https://packagist.org/packages/fenom/fenom)
- **Composer:** `composer require fenom/fenom`
- **Discussion:** [Fenom Forum](https://groups.google.com/forum/#!forum/php-ion)
- **Versioning:** [semver2](http://semver.org/)
- **Performance:** see [benchmark](./docs/en/benchmark.md)

---

Quick Start
-----------

[](#quick-start)

### Install

[](#install)

If you use composer in your project then you can to install Fenom as package.

### Setup

[](#setup)

There is two-way to create Fenom instance:

- Long way: use operator `new`
- Shot way: use static factory-method

**Long way.** Create you own template provider or default provider `Fenom\Provider` (that is provider read [there](./)). Using provider instance create Fenom instance:

```
$fenom = new Fenom(new Fenom\Provider($template_dir));
```

After that, set compile directory:

```
$fenom->setCompileDir($template_cache_dir);
```

This directory will be used for storing compiled templates, therefore it should be writable for Fenom. Now Fenom is ready to work and now you can to configure it:

```
$fenom->setOptions($options);
```

**Short way.** Creating an object via factory method with arguments from long way.

```
$fenom = Fenom::factory($template_dir, $template_cache_dir, $options);
```

Now Fenom is ready to work.

### Usage

[](#usage)

### Example

[](#example)

###  Health Score

59

—

FairBetter than 99% of packages

Maintenance52

Moderate activity, may be stable

Popularity51

Moderate usage in the ecosystem

Community44

Growing community involvement

Maturity80

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 86.6% 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 ~92 days

Recently: every ~449 days

Total

36

Last Release

1177d ago

Major Versions

1.4.9 → 2.0.02014-05-17

2.12.1 → v3.0.0.x-dev2023-02-23

PHP version history (2 changes)1.4.9PHP &gt;=5.3.0

v3.0.0.x-devPHP &gt;=8.0.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/135c5c250b5bf3601bec3f76db32610c07970441b96a557d0a7a767187912511?d=identicon)[bzick](/maintainers/bzick)

---

Top Contributors

[![bzick](https://avatars.githubusercontent.com/u/345384?v=4)](https://github.com/bzick "bzick (593 commits)")[![maxisoft-git](https://avatars.githubusercontent.com/u/2070199?v=4)](https://github.com/maxisoft-git "maxisoft-git (29 commits)")[![pafnuty](https://avatars.githubusercontent.com/u/1635679?v=4)](https://github.com/pafnuty "pafnuty (10 commits)")[![klkvsk](https://avatars.githubusercontent.com/u/1466771?v=4)](https://github.com/klkvsk "klkvsk (6 commits)")[![Loki3000](https://avatars.githubusercontent.com/u/12333165?v=4)](https://github.com/Loki3000 "Loki3000 (5 commits)")[![Daisuke-sama](https://avatars.githubusercontent.com/u/16666335?v=4)](https://github.com/Daisuke-sama "Daisuke-sama (4 commits)")[![sleuthhound](https://avatars.githubusercontent.com/u/1821565?v=4)](https://github.com/sleuthhound "sleuthhound (4 commits)")[![WinterSilence](https://avatars.githubusercontent.com/u/3521094?v=4)](https://github.com/WinterSilence "WinterSilence (3 commits)")[![tsukasa-mixer](https://avatars.githubusercontent.com/u/1190435?v=4)](https://github.com/tsukasa-mixer "tsukasa-mixer (3 commits)")[![zhabinka](https://avatars.githubusercontent.com/u/6164566?v=4)](https://github.com/zhabinka "zhabinka (2 commits)")[![bakatrouble](https://avatars.githubusercontent.com/u/7340354?v=4)](https://github.com/bakatrouble "bakatrouble (2 commits)")[![dakiesse](https://avatars.githubusercontent.com/u/5033716?v=4)](https://github.com/dakiesse "dakiesse (2 commits)")[![igorhim](https://avatars.githubusercontent.com/u/4836291?v=4)](https://github.com/igorhim "igorhim (2 commits)")[![MunGell](https://avatars.githubusercontent.com/u/812976?v=4)](https://github.com/MunGell "MunGell (2 commits)")[![sreenadh](https://avatars.githubusercontent.com/u/89586?v=4)](https://github.com/sreenadh "sreenadh (2 commits)")[![vasia123](https://avatars.githubusercontent.com/u/801823?v=4)](https://github.com/vasia123 "vasia123 (2 commits)")[![get-web](https://avatars.githubusercontent.com/u/39173640?v=4)](https://github.com/get-web "get-web (1 commits)")[![bezumkin](https://avatars.githubusercontent.com/u/1257284?v=4)](https://github.com/bezumkin "bezumkin (1 commits)")[![nekufa](https://avatars.githubusercontent.com/u/405067?v=4)](https://github.com/nekufa "nekufa (1 commits)")[![neronmoon](https://avatars.githubusercontent.com/u/486922?v=4)](https://github.com/neronmoon "neronmoon (1 commits)")

---

Tags

fenomphptemplate-enginetemplatetemplatingfenomtemplater

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[eftec/bladeone

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

8208.4M87](/packages/eftec-bladeone)[alhimik1986/php-excel-templator

PHP Spreadsheet extension for generating excel files from template

350336.7k1](/packages/alhimik1986-php-excel-templator)[duncan3dc/blade

Use Laravel Blade templates without the full Laravel framework

160499.5k24](/packages/duncan3dc-blade)[anourvalar/office

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

24085.2k](/packages/anourvalar-office)[eftec/bladeonehtml

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

1018.1k5](/packages/eftec-bladeonehtml)

PHPackages © 2026

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