PHPackages                             latte/latte - 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. latte/latte

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

latte/latte
===========

☕ Latte: the intuitive and fast template engine for those who want the most secure PHP sites. Introduces context-sensitive escaping.

v3.1.3(1mo ago)1.3k15.7M↓23.1%112[19 issues](https://github.com/nette/latte/issues)[4 PRs](https://github.com/nette/latte/pulls)20BSD-3-ClausePHPPHP 8.2 - 8.5CI passing

Since May 6Pushed 1mo ago55 watchersCompare

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

READMEChangelog (10)Dependencies (14)Versions (128)Used By (20)Security (2)

[![Latte](https://private-user-images.githubusercontent.com/194960/331203419-76c098ff-427c-4b30-9676-97e2d8fd4a56.jpg?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzUyNTI3MzIsIm5iZiI6MTc3NTI1MjQzMiwicGF0aCI6Ii8xOTQ5NjAvMzMxMjAzNDE5LTc2YzA5OGZmLTQyN2MtNGIzMC05Njc2LTk3ZTJkOGZkNGE1Ni5qcGc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNDAzJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDQwM1QyMTQwMzJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT01MWI0NTQ4YTEzY2Q5OTNkZTQ0ZWRlZGZmMDliNGEwMjJhY2JhMjU0NjA1NzAzZTkwODUxM2Q5YjBkNDU2ZWE0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.bWciAw1NGE6xJ6CGJ0C0I8XQdRLKqGX_NLal7s4Vim0)](https://latte.nette.org)

✅ The [only truly secure](https://latte.nette.org/en/safety-first) templating system for PHP
✅ [You already know the syntax](https://latte.nette.org/en/syntax)
✅ Highly mature, fast, and widely used library

[](#-the-only-truly-secure-templating-system-for-php-you-already-know-the-syntax-highly-mature-fast-and-widely-used-library)

Latte is the safest templating system for PHP. It is cleverly designed and easy to learn for those familiar with PHP, as they can quickly adopt its basic tags. A wide range of useful features will significantly simplify your work. It provides top-notch protection against critical vulnerabilities and allows you to focus on creating high-quality applications without worrying about their security.

🟨 Only 1% of programmers [can pass this quiz](https://blog.nette.org/en/quiz-can-you-defend-against-xss-vulnerability)!

Getting started
===============

[](#getting-started)

1️⃣ First, familiarize yourself with [Latte syntax](https://latte.nette.org/en/syntax) and [try it online](https://fiddle.nette.org/latte/#9cc0cf6d89)
2️⃣ Take a look at the basic set of [tags](https://latte.nette.org/en/tags) and [filters](https://latte.nette.org/en/filters)
3️⃣ Render a template with a [few lines of PHP code](https://latte.nette.org/en/develop)

[](#1️⃣-first-familiarize-yourself-with-latte-syntax-and-try-it-online2️⃣-take-a-look-at-the-basic-set-of-tags-and-filters3️⃣-render-a-template-with-a-few-lines-of-php-code)

Do you like Latte? Are you looking forward to the new features?

[![Buy me a coffee](https://camo.githubusercontent.com/afa7c20ccaac10ac4f1f51669bafb212856b932e0c8b276cb290336cf08624b8/68747470733a2f2f66696c65732e6e657474652e6f72672f69636f6e732f646f6e6174696f6e2d332e737667)](https://github.com/sponsors/dg)

Thank you!

###  Health Score

82

—

ExcellentBetter than 100% of packages

Maintenance89

Actively maintained with recent releases

Popularity71

Solid adoption and visibility

Community57

Growing community involvement

Maturity98

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 94.7% 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 ~35 days

Recently: every ~23 days

Total

124

Last Release

57d ago

Major Versions

v2.11.3 → v3.0.02022-05-17

v2.11.4 → v3.0.12022-06-01

v2.11.6 → v3.0.52023-01-16

v2.10.x-dev → v3.0.122023-11-13

PHP version history (13 changes)v2.2.0PHP &gt;=5.3.1

v2.4.0PHP &gt;=5.4.4

v2.5.0PHP &gt;=7.1

v2.9.0PHP &gt;=7.1 &lt;8.1

v2.10.4PHP &gt;=7.1 &lt;8.2

v3.0.0PHP &gt;=8.0 &lt;8.2

v3.0.3PHP &gt;=8.0 &lt;8.3

v2.11.6PHP &gt;=7.1 &lt;8.3

v3.0.7PHP 8.0 - 8.3

v2.11.x-devPHP 7.1 - 8.3

v3.0.18PHP 8.0 - 8.4

v3.0.24PHP 8.0 - 8.5

v3.1.0PHP 8.2 - 8.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/17f266513a3ca97500ec3d85d562b9279c7a6346358fe2b8d90390ece717a027?d=identicon)[david@grudl.com](/maintainers/david@grudl.com)

---

Top Contributors

[![dg](https://avatars.githubusercontent.com/u/194960?v=4)](https://github.com/dg "dg (2014 commits)")[![vrana](https://avatars.githubusercontent.com/u/117453?v=4)](https://github.com/vrana "vrana (17 commits)")[![JanTvrdik](https://avatars.githubusercontent.com/u/175109?v=4)](https://github.com/JanTvrdik "JanTvrdik (16 commits)")[![matej21](https://avatars.githubusercontent.com/u/1276059?v=4)](https://github.com/matej21 "matej21 (13 commits)")[![milo](https://avatars.githubusercontent.com/u/439140?v=4)](https://github.com/milo "milo (8 commits)")[![hrach](https://avatars.githubusercontent.com/u/284263?v=4)](https://github.com/hrach "hrach (7 commits)")[![juzna](https://avatars.githubusercontent.com/u/227416?v=4)](https://github.com/juzna "juzna (5 commits)")[![fprochazka](https://avatars.githubusercontent.com/u/158625?v=4)](https://github.com/fprochazka "fprochazka (5 commits)")[![kravco](https://avatars.githubusercontent.com/u/115938?v=4)](https://github.com/kravco "kravco (5 commits)")[![xificurk](https://avatars.githubusercontent.com/u/117465?v=4)](https://github.com/xificurk "xificurk (4 commits)")[![kukulich](https://avatars.githubusercontent.com/u/260445?v=4)](https://github.com/kukulich "kukulich (3 commits)")[![mishak87](https://avatars.githubusercontent.com/u/276500?v=4)](https://github.com/mishak87 "mishak87 (3 commits)")[![Majkl578](https://avatars.githubusercontent.com/u/144181?v=4)](https://github.com/Majkl578 "Majkl578 (3 commits)")[![vojtech-dobes](https://avatars.githubusercontent.com/u/415925?v=4)](https://github.com/vojtech-dobes "vojtech-dobes (3 commits)")[![enumag](https://avatars.githubusercontent.com/u/539462?v=4)](https://github.com/enumag "enumag (2 commits)")[![fabik](https://avatars.githubusercontent.com/u/816866?v=4)](https://github.com/fabik "fabik (2 commits)")[![stekycz](https://avatars.githubusercontent.com/u/865447?v=4)](https://github.com/stekycz "stekycz (2 commits)")[![spaze](https://avatars.githubusercontent.com/u/1966648?v=4)](https://github.com/spaze "spaze (2 commits)")[![MartyIX](https://avatars.githubusercontent.com/u/203266?v=4)](https://github.com/MartyIX "MartyIX (2 commits)")[![Tomix3D](https://avatars.githubusercontent.com/u/7952449?v=4)](https://github.com/Tomix3D "Tomix3D (1 commits)")

---

Tags

content-awarehtmllattenettenette-frameworkphpsafetysecuritysecurity-holetemplate-enginexsstwignettesecurityhtmltemplateengineescapingcontext-sensitive

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[voku/anti-xss-twig

Twig extension for XSS protection.

126.1k](/packages/voku-anti-xss-twig)[daycry/twig

twig for Codeigniter 4

145.1k2](/packages/daycry-twig)

PHPackages © 2026

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