A Blade-inspired PHP template engine. Compiles .zing templates to plain PHP once, caches the output, and includes it on every render — no runtime parsing overhead.
- PHP
^8.2
composer require zi/zinguse Zing\Engine;
$engine = new Engine(
viewPath: __DIR__ . '/resources/views',
cachePath: __DIR__ . '/storage/zing-cache',
);
echo $engine->render('pages.settings', ['user' => $user]);Template names use dot notation: pages.settings → resources/views/pages/settings.zing.
Full reference and syntax guide at collinsfabian.github.io/Zing.
Zing Template Syntax — VS Code extension with highlighting and snippets.
composer testOr run a specific test:
vendor/bin/phpunit --filter testIfDirective tests/EngineTest.phpzi/ is a vendor prefix shared across RexLLins packages — it does not appear in the namespace. Everything lives under Zing\.