Home  >  Article  >  Backend Development  >  Blitz templates 最快的PHP模板引擎_php模板

Blitz templates 最快的PHP模板引擎_php模板

WBOY
WBOYOriginal
2016-05-17 09:26:581154browse

简介:
Blitz templates 是一个用C语言开发的快速的PHP模板引擎,它是作为一个PHP的扩展功能。它开始作为一个php_templates更换,但发展到更多的工作。它是基于可扩展的模板控制器(自定义视图类在PHP )和简单的逻辑 。基准测试表明,这是最快的一个PHP的模板引擎,使Web应用程序更接近于一个聪明的MVC 结构模型,最大从您的代码分离出HTML。 这是专为大高负荷的有许多复杂的演示文稿的逻辑的互联网项目。

下图是几个模板的性能测试结果:

示例模板代码:
index.html
index.html
Html代码

复制代码 代码如下:


{{ $title }}

{{ include('header.tpl') }}
{{ list_news() }}
{{ include('footer.tpl') }}



index.php
复制代码 代码如下:

  $view = new Blitz('index.html');
  function list_news(){
   ....
  }
  $view -> parse();
?>

下载地址: http://sourceforge.net/projects/blitz-templates/files/
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn