Original author(s) | Armin Ronacher, Fabien Potencier |
---|---|
Developer(s) | SensioLabs |
Initial release | October 12, 2009 |
Stable release |
1.24.0 / January 26, 2016
|
Development status | Active |
Written in | PHP |
Operating system | Cross-platform |
Type | Template engine |
License | BSD License |
Website | twig |
Twig is a template engine for the PHP programming language. Its syntax originates from Jinja and Django templates. It's an open source product licensed under a BSD License and maintained by Fabien Potencier. The initial version was created by Armin Ronacher. Symfony2 PHP framework comes with a bundled support for Twig as its default template engine.
Twig is supported by the following integrated development environments:
And the text editors:
Twig defines three kinds of delimiters:
The apostrophe (') is the escape character.
The operators precedence is, from the less to more priority:
The example below demonstrates some basic features of Twig.