# smarty-php/smarty

Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic.

Repository: https://github.com/smarty-php/smarty
Canonical: https://ross.abutalabs.com/products/smarty
Language: PHP
License: NOASSERTION
License Family: other
Topics: smarty, php
Last push: 2026-08-25T19:49:11+00:00

## Health v2 (maintenance only)
Score: 96/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 90, longevity 100
- inputs: {"age_days": 4325, "days_push": 8, "days_rel": 65, "gap_med": 16.5, "n_releases_24m": 17}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2347, forks 709 (observed 2026-08-28T04:06:40.023987+00:00)

## What it is
Smarty is a mature template engine for PHP that separates presentation (HTML/CSS) from application logic. It provides a template syntax with variables, modifiers, and control structures compiled to PHP code.

## Use cases
- separate HTML templates from PHP application logic
- render web pages with a template engine in PHP
- let designers edit templates without touching business code
- compile templates for fast page rendering
- build MVC applications with a view layer
- migrate legacy PHP apps to templated output

## When to choose
- you have a PHP codebase needing clean separation of presentation and logic
- you want a battle-tested, long-established PHP template engine
- designers and developers need to work on separate files
- you need template compilation, caching, and inheritance features

## When to avoid
- you use a modern full-stack framework with its own templating (e.g., Laravel Blade, Symfony Twig)
- you build SPAs where the server renders no HTML
- you prefer plain PHP templates without a custom syntax

## Facets
- artifact type: library
- maturity: stable
- function: templating, web-framework
- domain: web-development, frontend, backend
- platform: php
- tags: template-engine, mvc, presentation-layer, html-templates

## Member repositories
- smarty-php/smarty (main) score 96

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:40.023987+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:37:00.984510+00:00, confidence not recorded.
  - readme: https://github.com/smarty-php/smarty (fetched 2026-08-28T04:06:40.023987+00:00, sha 273cdebc4add)
- Data as of 2026-08-30T08:39:29.467469+00:00.
