PHPackages                             skylarkelty/spark - 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. skylarkelty/spark

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

skylarkelty/spark
=================

A high-performance Template Parser designed to work inside a full templating engine or alongside an application.

1.1.1(12y ago)3172[1 PRs](https://github.com/SkylarKelty/Spark/pulls)Apache License v2.0PHPPHP &gt;=5.3

Since Aug 2Pushed 2y ago2 watchersCompare

[ Source](https://github.com/SkylarKelty/Spark)[ Packagist](https://packagist.org/packages/skylarkelty/spark)[ Docs](https://github.com/SkylarKelty/Spark)[ RSS](/packages/skylarkelty-spark/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (1)Versions (5)Used By (0)

Spark
=====

[](#spark)

[![Latest Stable Version](https://camo.githubusercontent.com/70461ea98a477dfd06e808c6b11cfb547b11ede896306d971bbf3f89eb4ac141/68747470733a2f2f706f7365722e707567782e6f72672f736b796c61726b656c74792f737061726b2f762f737461626c652e706e67)](https://packagist.org/packages/skylarkelty/spark)[![Build Status](https://camo.githubusercontent.com/937b5e8d8db044486e4bf9f0374bba960b09f8078091e70e7f02cd4f098cfd9b/68747470733a2f2f7472617669732d63692e6f72672f536b796c61724b656c74792f537061726b2e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/SkylarKelty/Spark)

*The 300 line template parser*

A high-performance Template Parser designed to work inside a full templating engine or alongside an application. Whilst Spark can be used on its own it includes a very limited set of features and is really only designed to work alongside a larger system.

Requires:

- PHP 5.3 (or above)

Spark takes a HTML page and tokenises all tags within a specified namespace (e.g. &lt;Spark\*&gt;) it then runs through user-specified callbacks for each token and replaces the token with the result.

The result of this project is a very simple template parser that can be hooked up to a more fully-featured templating engine.

### Usage

[](#usage)

```
$spark = new Spark\Core\Spark();
print $spark->run('');

```

### Adding a tag

[](#adding-a-tag)

```
$spark = new Spark\Core\Spark();

$spark->addTag("Example", function($html, $inner) {
    return "Hello World!";
});

print $spark->run('');

```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 92% 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

Every ~3 days

Total

4

Last Release

4705d ago

Major Versions

0.1a → 1.0.02013-08-03

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5101668?v=4)[Skylar Kelty](/maintainers/SkylarKelty)[@SkylarKelty](https://github.com/SkylarKelty)

---

Top Contributors

[![SkylarKelty](https://avatars.githubusercontent.com/u/5101668?v=4)](https://github.com/SkylarKelty "SkylarKelty (92 commits)")[![keiouu](https://avatars.githubusercontent.com/u/725383?v=4)](https://github.com/keiouu "keiouu (8 commits)")

---

Tags

templatetemplating

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/skylarkelty-spark/health.svg)

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

###  Alternatives

[eftec/bladeone

The standalone version Blade Template Engine from Laravel in a single php file

8259.3M103](/packages/eftec-bladeone)[fenom/fenom

Fenom - excellent template engine for PHP

44496.0k23](/packages/fenom-fenom)[duncan3dc/blade

Use Laravel Blade templates without the full Laravel framework

148504.3k26](/packages/duncan3dc-blade)[eftec/bladeonehtml

The standalone version Blade Template Engine from Laravel in a single php file

1021.6k6](/packages/eftec-bladeonehtml)

PHPackages © 2026

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