PHPackages                             skylarkelty/purity5 - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. skylarkelty/purity5

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

skylarkelty/purity5
===================

Purity5 is a HTML5 parser, with a similar interface to jQuery

1.1.0(12y ago)213[1 issues](https://github.com/SkylarKelty/Purity5/issues)Apache License v2.0PHPPHP &gt;=5.3

Since Aug 11Pushed 12y ago1 watchersCompare

[ Source](https://github.com/SkylarKelty/Purity5)[ Packagist](https://packagist.org/packages/skylarkelty/purity5)[ Docs](https://github.com/SkylarKelty/Purity5)[ RSS](/packages/skylarkelty-purity5/feed)WikiDiscussions master Synced 3w ago

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

Purity5 [![Build Status](https://camo.githubusercontent.com/9ca9891c2dc7236cec24f8aa2215d0f18a0c8563a9d35aff6238dadeadae1858/68747470733a2f2f7472617669732d63692e6f72672f536b796c61724b656c74792f507572697479352e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/SkylarKelty/Purity5)
================================================================================================================================================================================================================================================================================================

[](#purity5-)

Purity5 is a HTML5 query library, with a similar interface to jQuery.

To use, simply include Purity5 and use like so:

```
$html = Purity5::parse($markup);
$title = $html("title");
$table_headings = $html("body table tr th");
$first_table_headings = $html("body table tr th:first-child");
$active_links = $html("body a[class=active]");
$active_current_links = $html("body a[class=active+current]");
```

### Supported Selectors

[](#supported-selectors)

- a &gt; b
- a + b
- -
- .a
- \#a
- a.b
- a#b
- .a.b
- a:first-child
- a:last-child
- a:nth-child(num|even|odd)
- a\[attr='val'\]

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.5% 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 ~0 days

Total

2

Last Release

4705d ago

### 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 (85 commits)")[![keiouu](https://avatars.githubusercontent.com/u/725383?v=4)](https://github.com/keiouu "keiouu (4 commits)")

---

Tags

parserHTML5

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[nikic/php-parser

A PHP parser written in PHP

17.4k936.5M2.3k](/packages/nikic-php-parser)[doctrine/lexer

PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.

11.2k942.7M149](/packages/doctrine-lexer)[masterminds/html5

An HTML5 parser and serializer.

1.8k260.4M293](/packages/masterminds-html5)[erusev/parsedown

Parser for Markdown.

15.1k155.2M841](/packages/erusev-parsedown)[league/commonmark

Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)

3.0k426.1M944](/packages/league-commonmark)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k204.2M72](/packages/sabberworm-php-css-parser)

PHPackages © 2026

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