I think the basic principle of a PHP templating system is string replacing. Right? So can I just use a string to hold my html template code like
$str_template = "<html><head><title>{the_title}</title><body>{the_content}</body></html>"
and in the following code simply do a str_replace to push the data into my template variable like
str_replace( $str_template, '{the_title}', $some_runtime_generated_title );
str_replace( $str_template, '{the_content}', $some_runtime_generated_content );
then at last
echo $str_template;
Will this hopefully make the whole variable passing process a bit faster? I know this could be a weird question but has anybody tried it?