I'm starting to wonder whether a template system is really what I need.
Define "engine".
All you really "need" is a template "layer" such as bTemplate...you can hack on a custom caching interface or addon as required and the code executes as about as fast as you can get.
I do believe that static placeholder replacement is faster than PHP so if your templates are simple enough to warrant using static placeholders and speed is a concern, than by all means implement a simple str_replace like follow:
Code: Select all
$buffer = str_replace(array('##TITLE##','##CONTENT##'). array($title, $content), $buffer);
echo $buffer;
However if you need real control over hos things are rendered then a PHP alternative syntax template layer like bTemplate is all you need.
Smarty and similar template engines don't offer much if any advantage over generic templates, other than the security issue I pointed out earlier, as well as helpers, such as date formatting, etc.
Cheers,
Alex