Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
The best templating engine for PHP is PHP itself. This language is designed for just such purposes. With proper separation of business logic and presentation logic, we get the desired result with zero overhead.
I used to think that the best template engine is PHP and terribly argued with everyone who did not agree with this, after I had to use Twig, I radically changed my position. Very convenient, twig constructions are much shorter than their counterparts in php, there is support in an IDE, such as PhpStorm. In terms of performance, there is practically no overhead, they are compiled into php code on the first run.
twig. There are several reasons. Very convenient and clear syntax, filters/functions, template compilation, template inheritance. It is implemented using an AST parser, so it is quite convenient to expand the syntax.
probably popular twig. I myself use Blitz, as it connects with a separate extension. not an extra folder.
Previously (2007-2011) I used Smarty - a fairly powerful and understandable template engine. Moreover, it certainly worked no slower than Twig.
Probably the most popular twig. But I like Jade better . There is an implementation in php, scala, ruby, python, java.
Your own. Right now it only works under Yii. Yii + this thing really solves all the tasks that are needed in the application.
github.com/wartur/yii-thplike
I also use my own syntax a la haml, but native, I wrote an example of use in this comment . Requires PHP 5.4
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question