Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Here's what Fabien Potencier of the Symfony framework <a href="http://fabien.potencier.org/article/34/templating-engines-in-php" rel="nofollow noreferrer">has to say about templating engines</a>:</p> <blockquote> <p>Why do people still think PHP is a templating engine? Sure enough, PHP started its life as a template language, but it did not evolve like one in the recent years. If you think PHP is still a template language, can you give me just one recent change in the PHP language which enhanced PHP as a template language? I cannot think of one.</p> </blockquote> <p>He also describes the features that he looks for in a templating language:</p> <blockquote> <ul> <li>Concision</li> <li>Template oriented syntax</li> <li>Reusability</li> <li>Security</li> <li>Sandbox mode</li> </ul> </blockquote> <p>As well as some of the features that make his favorite templating language <a href="http://github.com/mitsuhiko/twig" rel="nofollow noreferrer">Twig</a> stand out:</p> <blockquote> <ul> <li>Native template inheritance (templates are compiled as classes);</li> <li>Solid automatic auto-escaping (with no associated runtime overhead as everything is done during compilation);</li> <li>Very secure sandbox mode (white-list the tags, filters, and methods that can be used in templates);</li> <li>Great extensibility: you override everything, even the core features, by bundling your own tags and filters as an extension; but you can also manipulate the AST (Abstract Syntax Tree) before compilation. By leveraging this possibilities, you can even create your own DSL (Domain Specific Language), targeted at your application.</li> </ul> </blockquote> <p>In the comments of the article, he says that, "It will probably be part of Symfony 2. But I first need some community feedback."</p> <p>Read <a href="http://fabien.potencier.org/article/34/templating-engines-in-php" rel="nofollow noreferrer">the full article</a> to get his whole argument in favor of templating systems.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload