Current Benchmark
<?php
$template = '
<html><head><title>{$title}</title></head><body><?php if(true) { ?>TRUE!<?php } else { ?>FALSE!<?php } ?></body></html>
';
$array = array (
'<?php' => '";',
'?>' => 'echo "',
);
$title = 'Page Title';
eval('echo "'.strtr($template, $array).'";');
?>
vs.
<?php
$template = '
<html><head><title>{$title}</title></head><body><IF (true)>TRUE!<ELSE>FALSE!</IF></body></html>
';
$title = 'Page Title';
$template = preg_replace('~<IF (.*?)(?<!\-)>(.*?)(<ELSE>(.*?))?</IF>~', '".(\\1 ? ("\\2") : ("\\4"))."', $template);
eval('echo "'.$template.'";');
?>
Conclusion
After an average of 8000 cycles, the fastest option is Benchmark 1!
<?php
$template = '
<html><head><title>{$title}</title></head><body><?php if(true) { ?>TRUE!<?php } else { ?>FALSE!<?php } ?></body></html>
';
$array = array (
'<?php' => '";',
'?>' => 'echo "',
);
$title = 'Page Title';
eval('echo "'.strtr($template, $array).'";');
?>