Finally finished Stencil. class. Heavy testing and benchmarking point out the following:
Text Formatted Code
Snippet, which does solely the parsing, is about a factor 4 faster
Templet, which adds files and blocks, is about a factor 3 faster.
However, that's not an honest benchmark. glTemplate does much more. Though it becomes dramatically slower when the number of variables rises. The tipping point is about 80 variables.
Benchmarking with a few unit tests delivers:
Text Formatted Code
noCache Caching
Stencil 0.01491... 0.00187...
Template 0.00251... 0.00249...
0.01240.... -0.00062... diff
glTemplate 0.00496... 0.00283...
0.00995... -0.00096... diff
-0.00740... -0.00317... average diff
The package is published on phpclasses.org:
https://www.phpclasses.org/package/11965-PHP-Template-engine-compiling-to-native-PHP-and-caches.html
For the time being there are some (minor) differences with GL, but a plugin is in the making.
For comments, contributing or beta testing, please use the support forum of the package at phpclasses.org, since I get increasingly allergic to all the dislikes on the GL forums.