Blitz templates is a fast PHP template engine written in C and compiled as a PHP extension. It started as a php_templates replacement, but developed into much more. It is based on extensible template controllers (custom view classes in PHP) and weakly-active templates (simple logic in HTML). Benchmarks show that it is one of the fastest template engines for PHP, even though it's not trivial and makes Web application closer to a smart MVC-like architecture model with maximal separation of HTML from your code. It was designed for big high-load Internet projects with a lot of complex presentation logic.
| Tags | Internet Web Site Management Dynamic Content |
|---|---|
| Implementation | C PHP |
| Translations | English Russian |
Recent releases


Changes: A new ini variable "blitz.check_recursion" was added. Use this setting to disable internal recursion check for recursive includes (for example, when building a hierarchical comment tree using a template that includes itself). A segfault in nested includes with user-defined functions was fixed (in some cases, there could be a double free of method result at shutdown stage).


Changes: Infinite include loops checking was added and corresponding segfaults were fixed. Automatic path extension with the global variable "blitz.path" was fixed on Windows-like systems. Block() affects contexts hidden by IF/UNLESS contexts. getStruct() returns IF/UNLESS contexts correctly. The internal method unless() was added as an opposite to if().


Changes: New methods ("assign" and "display") were added to Blitz class. "Assign" is a "set" alias. "Display" has the same arguments as "parse", and executes a template outputting the result immediately. A new ini variable "blitz.warn_context_duplicates" was added. When it's set to 1 (the default is 0), Blitz generates warnings for context name duplicates by comparing full context paths. A couple of rare segfaults were fixed (executing user/internal methods when calling "fetch" from non-initialized contexts without parameters).


Changes: A segfault when processing some "broken" templates was fixed.


Changes: Minor fixes were made. The variable prefix can be set to an empty value by ini_set now. Predefined variables are output correctly in a single-line if statement.