Home >Backend Development >PHP Tutorial >Blitz templates The fastest PHP template engine_PHP tutorial

Blitz templates The fastest PHP template engine_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 15:39:04904browse

Introduction:
Blitz templates is a fast PHP template engine developed in C language. It is used as an extension function of PHP. It started as a php_templates replacement but evolved into much more work. It is based on extensible template controllers (custom view classes in PHP) and simple logic. Benchmark tests show that this is the fastest template engine for PHP, bringing web applications closer to a smart MVC structural model, with maximum separation of HTML from your code. It is designed for large high-load internet projects with many complex presentation logics.

The following picture shows the performance test results of several templates:

Sample template code:
index.html
index.html
Html code

Copy code The code is as follows:


{{ $title}}

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



index.php
Copy code The code is as follows:

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

Download address: http://sourceforge.net/projects/blitz-templates/files/

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/321622.htmlTechArticleIntroduction: Blitz templates is a fast PHP template engine developed in C language, which is used as a PHP extension Function. It started as a php_templates replacement but evolved into something more...
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