PHPackages                             mykehowells/powerhtml - 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. mykehowells/powerhtml

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

mykehowells/powerhtml
=====================

HTML templating and parsing engine

1.0.0(5y ago)08GPLPHPPHP &gt;=5.4.0

Since Jul 21Pushed 5y ago1 watchersCompare

[ Source](https://github.com/mykemeynell/PowerHTML)[ Packagist](https://packagist.org/packages/mykehowells/powerhtml)[ Docs](https://github.com/mykehowells/powerparser)[ RSS](/packages/mykehowells-powerhtml/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

PowerHTML/PowerHTML
===================

[](#powerhtmlpowerhtml)

[![Stable version](https://camo.githubusercontent.com/0a149be5bbe826d8b2d5ad5bbea6a3a34b0242824c4388e6d16da8ad1ac07a06/68747470733a2f2f706f7365722e707567782e6f72672f6d796b65686f77656c6c732f506f77657248544d4c2f762f737461626c652e737667)](https://packagist.org/packages/mykehowells/powerhtml)[![Unstable version](https://camo.githubusercontent.com/0614a785b27174493823fe50ceffdb6c8227749999f1715f43109ee04c70fc9b/68747470733a2f2f706f7365722e707567782e6f72672f6d796b65686f77656c6c732f506f77657248544d4c2f762f756e737461626c652e737667)](https://packagist.org/packages/mykehowells/powerhtml)

Create HTML template with .pwr.html extension and make use in emails or whatever else!

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

[](#installation)

`composer require mykehowells/powerhtml`

Usage
-----

[](#usage)

Include the composer autoloader

`require __DIR__ . '/../vendor/autoload.php'`

Getting started with a basic PowerHTML setup. The below code would output the processed PowerHTML template to the browser.

```
$powerHtml = new \PowerHTML\PowerHTML;

$template = ( $_SERVER[ 'REQUEST_URI'] == '/' ) ? null : ltrim( $_SERVER[ 'REQUEST_URI'], '/' );

$powerHtml->with( 'hello', 'hello world' )
    ->parse( $template );

$powerHtml->render();
```

If you're looking to store the parsed html into a variable, use `store()` rather than `render()`.

Options
-------

[](#options)

### Change Template Directory

[](#change-template-directory)

**Default:** `/resources/templates`

```
$options = [
    'template_dir' => __DIR__ . '/public/templates'
];

$powerHtml = new \PowerHTML\PowerHTML( $options );
```

### Stop PHP Evaluation

[](#stop-php-evaluation)

Stopping PHP evaluation will stop the curly braces from being parsed in your templates. For example: {{$my\_var}} would be output as {{$my\_var}}.

```
$options = [
    'allow_php_eval' => false
];

$powerHtml = new \PowerHTML\PowerHTML( $options );
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2127d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/494de8188ad97403b72e40e385235a74ef6331aa2710b3727193f646189af9fc?d=identicon)[mykemeynell](/maintainers/mykemeynell)

---

Top Contributors

[![mykemeynell](https://avatars.githubusercontent.com/u/1590190?v=4)](https://github.com/mykemeynell "mykemeynell (1 commits)")

---

Tags

phpparserhtmltemplaterichpowerpowerhtmlpowerparser

### Embed Badge

![Health badge](/badges/mykehowells-powerhtml/health.svg)

```
[![Health](https://phpackages.com/badges/mykehowells-powerhtml/health.svg)](https://phpackages.com/packages/mykehowells-powerhtml)
```

###  Alternatives

[phug/phug

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

67292.2k13](/packages/phug-phug)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
