Blitz templates: The fastest php template engine

Source: Internet
Author: User
Tags php code php template

One recent job was to restructure the http://www.jobui.com and recruit http://www.baicai.com and find a very fast PHP template engine: Blitz templates. By the way, it took 1 days to translate its documents and hope to be useful to everyone!

Document Path: http://www.igaom.cn/blitz/Blitz_Docs.html

Brief introduction:

Blitz templates is a fast PHP template engine developed in C, which is an extended function of PHP. It started as a php_templates replacement, but developed to more work. It is based on an Extensible template controller (custom view class in PHP) and simple logic. Benchmark tests show that this is the fastest of a PHP template engine, making Web applications closer to a smart MVC architecture model, and maximizing the separation of HTML from your code. This is designed for large workloads with many complex presentations of the logic of the Internet project.

The following figure shows the performance test results for several templates:

Sample template code:

Index.html

Index.html

HTML code

<body>
{{ include('header.tpl') }}
{{ list_news() }}
{{ include('footer.tpl') }}
</body>

index.php

PHP code

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.