PHPackages                             alexoliverwd/brace - 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. alexoliverwd/brace

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

alexoliverwd/brace
==================

A simple template language written in PHP

v1.5.0(1w ago)13.9k↓80.6%1MITPHPPHP &gt;=8.4.1CI passing

Since Sep 16Pushed 1w ago1 watchersCompare

[ Source](https://github.com/aoliverwd/brace)[ Packagist](https://packagist.org/packages/alexoliverwd/brace)[ RSS](/packages/alexoliverwd-brace/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (10)Dependencies (18)Versions (55)Used By (1)

[![PHPUnit](https://github.com/aoliverwd/brace/actions/workflows/ci.yml/badge.svg)](https://github.com/aoliverwd/brace/actions/workflows/ci.yml/badge.svg)[![Latest Stable Version](https://camo.githubusercontent.com/71a8df006540cfe2eb3cbcc31be9723a3bb9e6f98ce2f2a8c39fbbc56a8ea243/68747470733a2f2f706f7365722e707567782e6f72672f616c65786f6c6976657277642f62726163652f76)](https://packagist.org/packages/alexoliverwd/brace)[![License](https://camo.githubusercontent.com/d3065fbe9b89372fd1595124520bc52a2691d4a1338649f5b6395c9e9696936c/68747470733a2f2f706f7365722e707567782e6f72672f616c65786f6c6976657277642f62726163652f6c6963656e7365)](https://packagist.org/packages/alexoliverwd/brace)

[![Brace Logo](https://github.com/aoliverwd/brace/wiki/branding/brace.svg)](https://github.com/aoliverwd/brace/wiki/branding/brace.svg)

Brace
=====

[](#brace)

Brace is a lightweight templating syntax for PHP that uses a familiar `{{ double-brace }}` syntax. It shares similarities with popular templating engines such as [Mustache](https://mustache.github.io/), [Twig](https://twig.symfony.com/), [Smarty](https://www.smarty.net/), and [Latte](https://latte.nette.org/).

Designed to be simple and easy to adopt, Brace focuses on a low learning curve while remaining flexible enough for most templating needs. It provides essential functionality out of the box without requiring additional dependencies.

Key Features:
-------------

[](#key-features)

1. [Variables](https://github.com/aoliverwd/brace/wiki/variables)
2. [Filters](https://github.com/aoliverwd/brace/wiki/filters)
3. [Conditional Statements](https://github.com/aoliverwd/brace/wiki/conditionals)
4. [Iterators](https://github.com/aoliverwd/brace/wiki/Iterators)
5. [Loops](https://github.com/aoliverwd/brace/wiki/loops)
6. [Function Hooks](https://github.com/aoliverwd/brace/wiki/callables)
7. [Shortcodes](https://github.com/aoliverwd/brace/wiki/shortcodes)
8. [Includes](https://github.com/aoliverwd/brace/wiki/includes)

Syntax
------

[](#syntax)

By default, Brace loads `.tpl` files from the current directory. The following example loads multiple templates, `document-header.tpl`, `template.tpl`, and `document-footer.tpl`, and outputs them as a single HTML file.

```
