# Smarty (PHP)

> The compiling template engine for PHP

Source: https://talira.ai/catalog/smarty-php-6ts7hh16
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / templating](https://talira.ai/categories/libraries/templating), [languages / php](https://talira.ai/categories/languages/php)
- Licence: LGPL-3.0-or-later[^2][^3]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [Smarty PHP project](https://talira.ai/orgs/smarty-php.md)

Smarty is a template engine for PHP that keeps presentation (HTML and CSS) apart from application logic. Templates use variables, modifiers, functions and tags such as if, and Smarty compiles them; its docs cover template inheritance, caching, config files, filters, a debugging console and a security policy.

## Links

- Website: https://smarty-php.github.io/smarty/stable/
- GitHub: https://github.com/smarty-php/smarty

## Problems it solves

- keep HTML out of my PHP application code
- let designers edit page templates without touching PHP
- cache rendered PHP templates

## Features

- template variables, modifiers and functions
- template inheritance
- template caching
- config files
- debugging console
- security policy for templates

## Trust

Overall: 0.55 out of 1.
Signals: maintenance 0.73, adoption 0.67, momentum 0.37, community 0.81, backing 0.30, extensibility 0.00.

- last commit 3 days ago
- 20 commits in the last 90 days
- latest release v5.9.1 3 days ago
- 2.4k GitHub stars
- 105 contributors
- accepts sponsorship (Github)
- backed by Smarty PHP project

## Alternatives

- [Twig](https://talira.ai/catalog/twig-gty3db20.md): The flexible, fast, and secure template engine for PHP
- [Latte](https://talira.ai/catalog/latte-k93t7svg.md): PHP template engine with context-sensitive escaping

## Sources

[^1]: https://smarty-php.github.io/smarty/stable/ (checked 29 Nov 2026)
[^2]: https://github.com/smarty-php/smarty/blob/master/LICENSE (checked 29 Nov 2026)
[^3]: https://github.com/smarty-php/smarty/blob/master/composer.json (checked 29 Nov 2026)
