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.4(2mo ago)1.3k16.2M↓51.8%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 4d 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 2d ago

READMEChangelog (10)Dependencies (21)Versions (129)Used By (20)Security (2)

[![Latte](https://private-user-images.githubusercontent.com/194960/331203419-76c098ff-427c-4b30-9676-97e2d8fd4a56.jpg?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI4Mzc1NDUsIm5iZiI6MTc4MjgzNzI0NSwicGF0aCI6Ii8xOTQ5NjAvMzMxMjAzNDE5LTc2YzA5OGZmLTQyN2MtNGIzMC05Njc2LTk3ZTJkOGZkNGE1Ni5qcGc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNjMwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDYzMFQxNjM0MDVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT02YmM0Y2M2NjEyYzA5MTcyYzMzMDhlMDQ3ZDZiMjEwNTc2MmU1MGE0MDJhODcwNGU2MWZhMzI0MmRkZmNjMGNmJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZqcGVnIn0.hgAQT0rsct9mMIBHBYrgzKW45_VkVrJDyQZ5lz-KP2w)](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)

Editor Integration
==================

[](#editor-integration)

- PhpStorm ([Latte](https://plugins.jetbrains.com/plugin/24218-latte-support) or [Latte Pro](https://plugins.jetbrains.com/plugin/19661-latte-pro))
- Visual Studio Code ([Nette Latte + Neon](https://marketplace.visualstudio.com/items?itemName=Kasik96.latte) or [Nette for VS Code](https://marketplace.visualstudio.com/items?itemName=franken-ui.nette-for-vscode))

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

83

—

ExcellentBetter than 100% of packages

Maintenance93

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

Total

125

Last Release

72d 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 (2030 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)")[![mishak87](https://avatars.githubusercontent.com/u/276500?v=4)](https://github.com/mishak87 "mishak87 (3 commits)")[![vojtech-dobes](https://avatars.githubusercontent.com/u/415925?v=4)](https://github.com/vojtech-dobes "vojtech-dobes (3 commits)")[![Majkl578](https://avatars.githubusercontent.com/u/144181?v=4)](https://github.com/Majkl578 "Majkl578 (3 commits)")[![kukulich](https://avatars.githubusercontent.com/u/260445?v=4)](https://github.com/kukulich "kukulich (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)")[![MartyIX](https://avatars.githubusercontent.com/u/203266?v=4)](https://github.com/MartyIX "MartyIX (2 commits)")[![spaze](https://avatars.githubusercontent.com/u/1966648?v=4)](https://github.com/spaze "spaze (2 commits)")[![TomasVotruba](https://avatars.githubusercontent.com/u/924196?v=4)](https://github.com/TomasVotruba "TomasVotruba (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

[phalcon/volt

Phalcon Volt is an HTML template engine for server-side rendering.

1225.2k2](/packages/phalcon-volt)[voku/anti-xss-twig

Twig extension for XSS protection.

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

twig for Codeigniter 4

155.5k2](/packages/daycry-twig)

PHPackages © 2026

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