PHP template engines are used widely to seperate the code & the layout.
This makes a website easier to maintain/update & creates a better development environment by enabling developers & designers to work together easier.
It sure has some drawbacks which is generally the performance (most libraries offer great solutions there) & need to learn a new syntax (not always).
To mention, using a template engine may not be suitable for every project. A website with few pages will probably won’t need it. But it can improve the development process of a portal, an e-commerce site or another web application easily.
Here are 19 PHP template engines with very nice features & have a continious development:
The most popular PHP templating engine which prefers to call itself a "template/presentation framework" as it equips both the designer & programmers with powerful tools at the presentation layer.
It has a robust caching mechanism as well as a strong plug-in & add-on support.
With the template functions, debugging capabilities, security it provides & continious development, Smarty is a great engine.
Dwoo aims to be a serious alternative to Smarty with a cleaner codebase.
It has almost a totally compatible template & plugin system with Smarty.
Some main features are:
- Template Inheritance, a fresh look at complex template structures, now built without includes.
- Flexible plugin creation.
- Scope aware engine, allowing for shorter templates.
- Unicode / UTF-8 support for string manipulation functions & more..
A lightweight templating engine for PHP.
it uses PHP itself as its template language & no need to learn a new markup system.