PHPackages                             vaibhavpandeyvpz/phew - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. vaibhavpandeyvpz/phew

ActiveLibrary[Templating &amp; Views](/categories/templating)

vaibhavpandeyvpz/phew
=====================

Simple (just 2 classes) and native PHP view engine with support for inheritance (layouts).

2.0.0(6mo ago)22781MITPHPPHP ^8.2CI failing

Since Feb 10Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/vaibhavpandeyvpz/phew)[ Packagist](https://packagist.org/packages/vaibhavpandeyvpz/phew)[ Docs](https://github.com/vaibhavpandeyvpz/phew)[ RSS](/packages/vaibhavpandeyvpz-phew/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (1)Versions (4)Used By (1)

vaibhavpandeyvpz/phew
=====================

[](#vaibhavpandeyvpzphew)

A simple, lightweight, and native PHP view engine with support for template inheritance (layouts), blocks, partials, and namespaces. Built with just 2 core classes and zero dependencies.

[![Latest Version](https://camo.githubusercontent.com/d2bd3356373af139eed1b48eb3368593029206aa47633c7f86900dd25616c1ae/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7661696268617670616e64657976707a2f706865772e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vaibhavpandeyvpz/phew)[![Downloads](https://camo.githubusercontent.com/8850cd18c2572e3316895a511598d1bc1e1ea8b29b7c9c4b31977f27f5b07465/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7661696268617670616e64657976707a2f706865772e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vaibhavpandeyvpz/phew)[![PHP Version](https://camo.githubusercontent.com/4a84619d1d1900810b4efc3587d470a82f2268b61bdfac725ed2361ec9b83189/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7661696268617670616e64657976707a2f706865772e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vaibhavpandeyvpz/phew)[![License](https://camo.githubusercontent.com/8e672f1ddd5b0a3cbc7fe329e1f79eadc8ccf6f367a8c94dc44d831b104d34e1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7661696268617670616e64657976707a2f706865772e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Build Status](https://camo.githubusercontent.com/1150f12cfd0145e0a7696d8e65c040dd613c0f17a3e37aa0fbcd8aa331ed4f25/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7661696268617670616e64657976707a2f706865772f74657374732e796d6c3f6272616e63683d6d6173746572267374796c653d666c61742d737175617265)](https://github.com/vaibhavpandeyvpz/phew/actions)

Features
--------

[](#features)

- 🚀 **Lightweight**: Just 2 core classes, zero dependencies
- 📦 **Native PHP**: No compilation, no special syntax to learn
- 🎨 **Layout Inheritance**: Extend parent templates with blocks
- 🧩 **Partials**: Reusable template fragments
- 📁 **Namespaces**: Organize templates with namespaces
- 🔧 **Extensible**: Register custom functions and extensions
- ✅ **Type Safe**: Full PHP 8.2+ type hints and strict types
- 🧪 **Well Tested**: 100% code coverage

Requirements
------------

[](#requirements)

- PHP 8.2 or higher

Installation
------------

[](#installation)

Install via Composer:

```
composer require vaibhavpandeyvpz/phew
```

Quick Start
-----------

[](#quick-start)

### Basic Usage

[](#basic-usage)

```
