
Latte
PHP templating engine that compiles templates into PHP code and escapes output according to the HTML context it appears in.
Latte is a templating engine for PHP. Its expressions are written exactly as in PHP. Latte compiles templates into PHP code, caches the result on disk and regenerates the cache when the source file changes. It escapes each value according to the HTML context it appears in, such as text, an attribute or JavaScript. The engine is called from PHP code, which passes parameters as arrays or as typed objects.
Worth knowing
The homepage compares Latte with Twig, and a converter on the Latte site turns Twig templates into Latte.
Sources
- 2026-11-16: links, Categories
latte.nette.org/ - 2026-11-16: links, Written in, GitHub stars
api.github.com/repos/nette/latte - 2026-11-16: links, Install with, Multilingual
latte.nette.org/en/develop - 2026-11-16: Maintainer
github.com/nette/latte/blob/master/license.md - 2026-11-16: First release, Current major version, Last release
api.github.com/repos/nette/latte/releases?per_page=100 - 2026-11-16: Runtime, Minimum runtime, License, License model
github.com/nette/latte/blob/v3.1.7/composer.json - 2026-11-16: Contributors
api.github.com/repos/nette/latte/contributors?per_page=1 - 2026-11-16: Packagist downloads
packagist.org/packages/latte/latte.json