PHPackages                             divengine/div - 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. divengine/div

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

divengine/div
=============

Div PHP Template Engine

6.1.3(3mo ago)291.1k4[23 issues](https://github.com/divengine/div/issues)GPL-3.0-or-laterPHPPHP &gt;=8.0.0CI passing

Since Jul 4Pushed 3mo ago1 watchersCompare

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

READMEChangelog (10)Dependencies (3)Versions (17)Used By (0)

Div PHP Template Engine
=======================

[](#div-php-template-engine)

[![Latest Stable Version](https://camo.githubusercontent.com/5b5424193071f15f6874e0905535cd7a5af445fe04a955783b0fa36ad737a97b/68747470733a2f2f706f7365722e707567782e6f72672f646976656e67696e652f6469762f76)](https://packagist.org/packages/divengine/div)[![Total Downloads](https://camo.githubusercontent.com/d877784e7f27d6d384a4852f6ee07cd0a77487ee1b6cef95b66345670d2811e1/68747470733a2f2f706f7365722e707567782e6f72672f646976656e67696e652f6469762f646f776e6c6f616473)](https://packagist.org/packages/divengine/div)[![Latest Unstable Version](https://camo.githubusercontent.com/6d2a06a746d922aad5da3e9ed7cedf1cd7191c027cd749d5e3bee293e691ce16/68747470733a2f2f706f7365722e707567782e6f72672f646976656e67696e652f6469762f762f756e737461626c65)](https://packagist.org/packages/divengine/div)[![License](https://camo.githubusercontent.com/070ef8b901b492fffc27090863e138f5000e0323daaec8bd9e013fde7419c215/68747470733a2f2f706f7365722e707567782e6f72672f646976656e67696e652f6469762f6c6963656e7365)](https://packagist.org/packages/divengine/div)[![PHP Version Require](https://camo.githubusercontent.com/2882528df4223aadf6463acea6336e1738b56e576ff34079cdd68cd7e0323e4b/68747470733a2f2f706f7365722e707567782e6f72672f646976656e67696e652f6469762f726571756972652f706870)](https://packagist.org/packages/divengine/div)

**div** is a [template engine](https://en.wikipedia.org/wiki/Template_processor) and [code generator](https://en.wikipedia.org/wiki/Code_generation_%28compiler%29) written in [PHP](http://php.net/) and developed since 2011. It optimizes collaboration between developers and designers through generative programming, model-driven architecture, and meta-programming.

This engine facilitates separation of concerns and allows deep customization by creating tailored template [dialects](https://dialector.divengine.org) to fit specific project needs. Dialects can adapt syntax and behavior to match different frameworks or coding conventions.

A distinctive feature of **div** is its ability to **recursively process templates until all code is resolved**, effectively preventing infinite loops and enabling complex, multi-step transformations. This provides exceptional flexibility to dynamically generate content or code.

**div** is the cornerstone of [Divengine Software Solutions](https://divengine.com) and follows the philosophy *"build more with less"* and *"divide the problem, not the people."* Its code generation relies on clear rules: the model describes what must be done, the templates define the desired output, and the engine acts as a black box executor.

Basic operations:

- **Compile**: Combine a template with models and save the result.
- **Transform**: Convert one model to another, reusing compile.
- **Compose**: Integrate different results using the engine and other tools.

With **div**, teams can:

- Avoid repetitive tasks.
- Scale projects based on models.
- Migrate to different technologies.
- Expand applications to new platforms and devices.

It improves performance and empowers non-technical collaborators to contribute to development.

Install
-------

[](#install)

```
composer require divengine/div
```

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

[](#documentation)

For complete guides, usage examples, and advanced topics, please visit the [project Wiki](../../wiki).

If you find something missing or have improvements, feel free to contribute directly to the Wiki!

Powered by [Divengine Software Solutions](https://divengine.com)

###  Health Score

48

—

FairBetter than 95% of packages

Maintenance65

Regular maintenance activity

Popularity29

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity72

Established project with proven stability

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

Recently: every ~186 days

Total

15

Last Release

99d ago

Major Versions

5.1.6 → 6.0.02023-12-24

PHP version history (2 changes)5.0.0PHP &gt;=5.4.0

6.0.0PHP &gt;=8.0.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/7b506fc05da7cae848732978887e03eb4cf5a71a05a665d67eea342320f9cbbb?d=identicon)[rafageist](/maintainers/rafageist)

---

Top Contributors

[![rafageist](https://avatars.githubusercontent.com/u/25892480?v=4)](https://github.com/rafageist "rafageist (150 commits)")

---

Tags

code-generationcustom-languagemodel-driven-developmentmodel-transformationsphptemplate-enginetemplate-languagecode generatortemplate engine

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[phptal/phptal

PHPTAL is a templating engine for PHP5 that implements Zope Page Templates syntax

179421.6k19](/packages/phptal-phptal)[foil/foil

PHP template engine for native PHP templates

170111.2k7](/packages/foil-foil)[proai/laravel-handlebars

A Laravel wrapper for LightnCandy for using the Handlebars (and Mustache) template engine.

38204.7k](/packages/proai-laravel-handlebars)[talesoft/tale-pug

A clean, lightweight and easy-to-use templating engine for PHP based on Pug, formerly Jade

319.4k3](/packages/talesoft-tale-pug)[wanze/template-engine-factory

Provides ProcessWire integration for various template engines such as Twig.

2612.0k4](/packages/wanze-template-engine-factory)[leitsch/kirby-blade

Enable Laravel Blade Template Engine for Kirby 4 and Kirby 5

219.2k](/packages/leitsch-kirby-blade)

PHPackages © 2026

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