One of the unique aspects about Smarty is the template compling. This means Smarty reads the template files and creates PHP scripts from them. Once they are created, they are executed from then on. Therefore there is no costly template file parsing for each request, and each template can take full advantage of PHP compiler cache solutions such as Zend Accelerator (http://www.zend.com) or PHP Accelerator (http://www.php-accelerator.co.uk).
It is efficient since the PHP parser does the dirty work.
用php剖析器干这个苦差事是无效的
No template parsing overhead, only compiles once.
不需求过剩的模板语法解析,仅仅是编译一次
It is smart about recompiling only the template files that have changed.
仅对修正过的模板文件停止从头编译
You can make custom functions and custom variable modifiers, so the template language is extremely extensible.
可以编纂'自界说函数'和自界说'变量',因而这类模板言语完整可以扩大
Configurable template delimiter tag syntax, so you can use {}, {{}}, <!--{}-->, etc.
可以自行设置模板定界符,所以你可使用{}, {{}}, <!--{}-->, 等等
The if/elseif/else/endif constructs are passed to the PHP parser, so the {if ...} expression syntax can be as simple or as complex as you like.
诸如 if/elseif/else/endif 语句可以被传递到php语法解析器,所以 {if ...} 表达式是复杂的或是复合的,随你喜好啦
Unlimited nesting of sections, ifs, etc. allowed.
假如答应的话,section之间可以无穷嵌套
It is possible to embed PHP code right in your template files, although this may not be needed (nor recommended) since the engine is so customizable.
引擎是可以定制的.可之内嵌php代码到你的模板文件中,固然这能够其实不需求(不保举)