Twig / PHP templates

Posted on 13 Oct 2009. in links php

Fabien Potencier of Symfony fame has released a new version of the Twig template library for PHP. Twig was originally created by Armin Ronacher, but the project had been mostly dead until Fabien brought it back to life. The templates look a lot like Django’s (or Jinja’s, which Armin also created):

    {% for user in users %}
        * {{ user.name }}
    {% else %}
        No user has been found.
    {% endfor %}

Finally, a viable alternative to the crusty old beast that is Smarty.