PHP template technology should be often mentioned, like the more famous Phplib Fasttemplate, have basically implemented the MVC pattern, the work is not abrasive, now with the 2 template is not much, because there is another template class Smarty, Smarty and Phplib The main difference between these template classes is that Smarty adds a cache feature that does not have to recompile the template every time you open the program.
Below I have used the smarty, the view of it.
Smarty did not do the best, because its compiled template is too bloated, you can open the Smarty compiled template page, inside are some objects, and very complex, PHP on the object variable processing is very slow, and the compiled template is not required to see the programmer, why to make so complicated, can affect speed.
In addition, to use smarty, you also need to familiarize yourself with some of its specialized grammar, like learning a new language (though not very complex, but also very troublesome).
Finally, Smarty is very dead and can hardly define the template tag that he wants.
Here's a template technique that feels good. The discuz! template function.
The template function of the discuz! is to replace the label in the template directly with the PHP syntax, and the result of the program execution is actually PHP and HTML mixed program, so the program speed is the fastest, no one will oppose this argument.
discuz! template function is very concise, only a short dozens of lines, compared to smarty, to be concise too much, so concise code, if you want to add new features or tags is very simple, the same implementation of MVC, and speed than smarty absolutely faster. The perfect combination of flexibility and speed is achieved.