The performance of the template engine cannot be compared to the native PHP code, as to what "the code in the template engine is clear", read the following. Alternative Syntax alternate syntax for Echo
Usually, print a variable
<?php echo $variable;?>
Using alternative syntax, you can write this
<?= $variable?>
alternative syntax for control structures if
<?php if ():?>
//code
<?php elseif ():?>
//code
<?php Else:?>
//code
&L t;? PHP endif;?>
Switch
<?php switch ():?>
<?php case:?>
//code
<?php break;? >
<?php Case:?>
//code
<?php break;? >
<?php default:?>
//code
<?php endswitch;? >
while
<?php while ():?>
//code
<?php endwhile;? >
Note that there is no alternative syntax for do...while. for
<?php for ():?>
//code
<?php endfor;? >
foreach
<?php foreach ():?>
//code
<?php Endforeach;?>
compared to the template engine
Smarty's If
{if $name = = ' VIP '}
If in PHP
<?php if ($name = = ' VIP '):?>
Compared to the two, using pure PHP is not as bad as imagined it. Moreover, no longer need to learn any template technology.