Top 25 PHP template engines

January 30, 2009 · Print This Article

After searching the Internet for a good template engine, I have compiled the following list:

Smarty is a template engine that compiles the templates into PHP scripts, then executes those scripts. Very fast, very flexible.

Heyes Template Class
A very easy to use, yet powerful and quick template engine that enables you to separate your page layout and design from your code.

A simple variable interpolation template class that parses your templates for variables and spits out HTML with their values

A simple and easy to use class that lets you make whole websites based on template files for layouts. Change the template and your whole site changes.

STP Simple Template Parser
A simple, light weight and easy to use template parser class. It can assemble a page from several templates, output result pages to the browser or write them to the filesystem.

OO Template Class
An object oriented template class you can use in your own programs.

A template engine to create and structure websites and applications. It can translate and compile the templates.

A small and fast template class that allows you to separate your PHP logic from your HTML presentation code.

A powerful but lightweight PEAR-compliant template system. It is non-compiling, and uses PHP itself as its template language.

ETS – easy template system
A template system that allows you to reshuffle templates with exactly the same data.

A simple, yet powerful templating system for your site.

A fast, full featured template system that includes a caching and debugging class.

A template engine that is multi-byte safe and consumes little computing resource. It supports variable replacement and content blocks that can be set to hidden or shown.

Grafx Software’s Fast Template
A modification of the popular Fast Template system, this includes a cache function, debug console, and silent removal of unassigned dynamic blocks.

A fast, simple and powerful template class. Features nested dynamic block support, block/file include support and show/hide unassigned variables.

This library function was designed for use with template files and allows you to retrieve info from HTML files.

htmltmpl: templating engine
A templating engine for Python and PHP. Targeted to web application developers, who want to separate program code and design of their projects.

PHP Class for Parsing Dreamweaver templates
A simple class to parse a Dreamweaver template for use in custom mods for a Gallery 2 and a WordPress blog.

MiniTemplator (Template Engine)
A compact template engine for HTML files. It features a simple syntax for template variables and blocks. Blocks can be nested.

Layout Solution
Simplifies website development and maintenance. It holds commonly used variables and page elements so you don’t need to duplicate common layouts over and over.

Cached Fast Template
This inclusion into FastTemplate allows for caching of the template files, and can even cache with different specifications on separate blocks of content.

A template engine that supports MySQL, Odbc, Sql-Server and ADODB. It includes seven methods and two properties.

Brian Lozier’s php based template engine
Only 2k in size, very fast and object-orientated.

a template engine that separates code from design.

a XML/XHTML template library for PHP.

Your choice for site templates and wordpress themes


3 Responses to “Top 25 PHP template engines”

  1. unix on April 28th, 2011 6:31 pm

    Many of the template above are compared in this template engine benchmark that presents the results in charts:

    In your list you forgot 2 of the most used template engine, Dwoo and RainTPL

    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:
    * Inheritance
    * Plugin
    * UTF-8 support


    Rain TPL
    An easy to use and install engine which has 8 tags, 4 PHP functions in a single class/file. Rain TPL is WYSIWYG, you can work with img/css relative paths & they are converted to the correct server path.


  2. limhanchung on December 30th, 2011 6:02 pm

    Your forgot to include twig

    Twig is a modern template engine for PHP

    Online demo:

  3. rafa3 on April 10th, 2012 12:09 pm

    Try the fast and easy Div PHP Template Engine, everything in one class!

Got something to say?

You must be logged in to post a comment.