phug/compiler

Pug (ex-Jade) compiler for PHP, HTML template engine structured by indentation

Maintainers

Package info

github.com/phug-php/compiler

Homepage

Documentation

pkg:composer/phug/compiler

Statistics

Installs: 88 395

Dependents: 5

Suggesters: 0

Stars: 4

Open Issues: 0

2.0.1 2026-03-15 18:02 UTC

This package is auto-updated.

Last update: 2026-03-15 18:10:11 UTC


README

What is Phug Compiler?

The Phug compiler get pug string or a pug file then return a PHP compiled template.

Installation

Install via Composer

composer require phug/compiler

Usage

$compiler = new Phug\Compiler($options);
$phtml = $compiler->compile($pugInput);

//$phtml is the PHP compiled template