twig tutorial - What is Twig - twig definition - define twig - twig php - twig template
What is Twig?
- Twig is a templating language that compiles to optimized PHP code. It is primarily used for outputting HTML, but can also be used to output any other text-based format. It is a standalone component that can be easily integrated into any PHP project.
learn twig - twig tutorial - twig components - twig code -
twig template
- twig programming - twig download - twig examples
It provides many excellent features:
- Autoescaping for HTML (helps to prevent XSS)
- Syntax designed with templating in mind (based on Django templates)
- Template inheritance
- Macros
Example of Twig's syntax: