latte/latte

☕ Latte: the safest template engine for PHP. Context-sensitive escaping stops XSS, tags speak PHP, and n:attributes keep the HTML clean.
17,026,355 1,291
Install
composer require latte/latte
Latest Version:v3.1.6
PHP:8.2 - 8.5
License:BSD-3-Clause
Last Updated:Oct 22, 2026
Links: GitHub  ·  Packagist
Maintainer: david@grudl.com

Latte

 

✅ 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!

 

Getting started

1️⃣ First, familiarize yourself with Latte syntax and try it online
2️⃣ Take a look at the basic set of tags and filters
3️⃣ Render a template with a few lines of PHP code

 

Editor Integration

 

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

Buy me a coffee

Thank you!

Related Packages

wodcz/laravel-latte

Latte templating engine integration with Laravel

21 0
ajiho/think-blade

Blade integration for thinkphp6

10 0
hedronium/spaceless-blade

Adds the @spaceless tag to Blade. (works like in Twig)

675,367 31
noadek/twiggy

Twig template engine implementation for Laravel. Allows you to use twig without...

35 3
anaklanangdev/ci-blade

Use Blade templates engine on codeigniter framework

1 0

Version History

Version Released PHP License
v3.1.6 8.2 - 8.5 BSD-3-Clause or GPL-2.0-only or GPL-3.0-only
v3.1.5 8.2 - 8.5 BSD-3-Clause or GPL-2.0-only or GPL-3.0-only
v3.1.4 8.2 - 8.5 BSD-3-Clause or GPL-2.0-only or GPL-3.0-only
v3.1.3 8.2 - 8.5 BSD-3-Clause or GPL-2.0-only or GPL-3.0-only
v3.1.2 8.2 - 8.5 BSD-3-Clause or GPL-2.0-only or GPL-3.0-only