PHPackages                             codemix/handlebarsphp - 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. codemix/handlebarsphp

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

codemix/handlebarsphp
=====================

Transpiles handlebars templates into native PHP templates.

v0.0.2(12y ago)6201MITPHPPHP &gt;=5.3.0

Since Jul 2Pushed 12y agoCompare

[ Source](https://github.com/codemix/handlebarsphp)[ Packagist](https://packagist.org/packages/codemix/handlebarsphp)[ RSS](/packages/codemix-handlebarsphp/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (3)Used By (0)

HandlebarsPHP
=============

[](#handlebarsphp)

### Note: this is alpha quality software, use at your own risk.

[](#note-this-is-alpha-quality-software-use-at-your-own-risk)

Turns handlebars templates into executable PHP code ahead of time, ships with built in support for Yii 1.x. but allows customisation of output to support different frameworks.

Installation
============

[](#installation)

Install via composer, package name is `codemix/handlebarsphp`.

Differences from HandlebarsJS
=============================

[](#differences-from-handlebarsjs)

HandlebarsPHP aims to be compatible with a subset of HandlebarsJS. For performance reasons it compiles the templates ahead of time and this necessitates some restrictions.

1. Since it's impossible to tell whether a tag like `{{foo}}` is a helper or a property at compile time, we assume that its a property. We differentiate helpers by looking for arguments, for example `{{foo 1}}` will be interpretted as a function call because it has an argument. This means that it is impossible to call a helper with zero arguments.
2. `{{@key}}` and `{{@index}}` always point to the same variable, because `foreach` is used for all iteration.

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

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

Total

2

Last Release

4743d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3acf6b979253030380f45271ce4efc9d5f3a207a96fafe6c92da41876ae33b24?d=identicon)[codemix](/maintainers/codemix)

---

Top Contributors

[![phpnode](https://avatars.githubusercontent.com/u/363611?v=4)](https://github.com/phpnode "phpnode (2 commits)")

---

Tags

templatetemplateshandlebars

### Embed Badge

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

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

###  Alternatives

[phpoffice/phpword

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

7.6k37.4M222](/packages/phpoffice-phpword)[zordius/lightncandy

An extremely fast PHP implementation of handlebars ( http://handlebarsjs.com/ ) and mustache ( http://mustache.github.io/ ).

61010.9M53](/packages/zordius-lightncandy)[rize/uri-template

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

435149.5M60](/packages/rize-uri-template)[laminas/laminas-view

Fast and type safe HTML templating library with a flexible plugin system supporting multistep template composition

7528.4M261](/packages/laminas-laminas-view)[devtheorem/php-handlebars

A blazing fast, spec-compliant PHP implementation of Handlebars.

4039.8k5](/packages/devtheorem-php-handlebars)

PHPackages © 2026

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