Here we are providing list of projects whith code and documentation.
There are many templating engines out there, which are very fast,elegant,multipurpose (eg. mustache twig handlebars jade doT and so on..) Mostly sophisticated engines used the custom parser to build the engine.
This Repository does a minimum parsing (and caching) in order to create dynamic templates (which can be used in both PHP and Javascript) and trying to contain the needed functionality inside the common language subset.
Most of the time this can be accomplished, the rest functionality is built with custom functions which mostly resemble the PHP syntax, yet work the same in Javascript.
PHP Project : Templating Engine