PHPackages                             torann/dom-parser - 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. torann/dom-parser

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

torann/dom-parser
=================

A HTML DOM parser written in PHP7 let you manipulate HTML in a very easy way! Supports invalid HTML. Find tags on an HTML page with selectors just like jQuery. Extract contents from HTML in a single line.

2.0.2(5y ago)1529↓80%MITPHPPHP ^7.1|^8.0

Since May 4Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Torann/dom-parser)[ Packagist](https://packagist.org/packages/torann/dom-parser)[ Docs](https://github.com/Torann/dom-parser)[ RSS](/packages/torann-dom-parser/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (3)DependenciesVersions (9)Used By (0)

Simple HTML DOM Parser
======================

[](#simple-html-dom-parser)

[![Latest Stable Version](https://camo.githubusercontent.com/cb9bfe8d7eafa85293323ab586ac0a1f3d0db57442c074e301373004ced5e4a4/68747470733a2f2f706f7365722e707567782e6f72672f746f72616e6e2f646f6d2d7061727365722f762f737461626c652e706e67)](https://packagist.org/packages/torann/dom-parser)[![Total Downloads](https://camo.githubusercontent.com/d4cadf0b4a2b57a76a5e950f47180e5bbb796b9700fc2425444551903cbca9c7/68747470733a2f2f706f7365722e707567782e6f72672f746f72616e6e2f646f6d2d7061727365722f646f776e6c6f6164732e706e67)](https://packagist.org/packages/torann/dom-parser)[![Patreon donate button](https://camo.githubusercontent.com/f9e075baad95563481d35174d43ef50757281abb6bc795d0f473fad452afa030/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f70617472656f6e2d646f6e6174652d79656c6c6f772e737667)](https://www.patreon.com/torann)[![Donate weekly to this project using Gratipay](https://camo.githubusercontent.com/0eeae019980adaa1dc64842cfb01f3d738c688982ea4eb58094047011cb46704/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f67726174697061792d646f6e6174652d79656c6c6f772e737667)](https://gratipay.com/~torann)[![Donate to this project using Flattr](https://camo.githubusercontent.com/d79e412f78041f87e203449041ad81848a8405cf0f3c622c51e3bad0c2a4b599/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f666c617474722d646f6e6174652d79656c6c6f772e737667)](https://flattr.com/profile/torann)[![Donate to this project using Paypal](https://camo.githubusercontent.com/604e3db9c8751116b3f765aad0353ec7ded655bbe8aaacbc38d8c4a6b784b3ed/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446f6e6174652d50617950616c2d677265656e2e737667)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=4CJA2A97NPYVU)

A HTML DOM parser written in PHP7 let you manipulate HTML in a very easy way! Supports invalid HTML. Find tags on an HTML page with selectors just like jQuery. Extract contents from HTML in a single line.

Usage
-----

[](#usage)

From a string:

```
use Torann\DomParser\HtmlDom;

$dom = HtmlDom::fromString($str);

$elements = $dom->find($el_name);
```

From a file:

```
use Torann\DomParser\HtmlDom;

$dom = HtmlDom::fromFile($file_name);

$elements = $dom->find($el_name);
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 78.1% 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 ~419 days

Recently: every ~455 days

Total

8

Last Release

1827d ago

Major Versions

v1.5.2 → 2.0.02019-04-15

PHP version history (3 changes)v1.5.0PHP &gt;=5.3.2

2.0.0PHP ^7.1.3

2.0.2PHP ^7.1|^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1406755?v=4)[Daniel Stainback](/maintainers/torann)[@Torann](https://github.com/Torann)

---

Top Contributors

[![sunra](https://avatars.githubusercontent.com/u/635370?v=4)](https://github.com/sunra "sunra (50 commits)")[![Torann](https://avatars.githubusercontent.com/u/1406755?v=4)](https://github.com/Torann "Torann (5 commits)")[![WanderingZombie](https://avatars.githubusercontent.com/u/675501?v=4)](https://github.com/WanderingZombie "WanderingZombie (3 commits)")[![mlocati](https://avatars.githubusercontent.com/u/928116?v=4)](https://github.com/mlocati "mlocati (2 commits)")[![zio-mitch](https://avatars.githubusercontent.com/u/5042579?v=4)](https://github.com/zio-mitch "zio-mitch (1 commits)")[![mryanb](https://avatars.githubusercontent.com/u/3656391?v=4)](https://github.com/mryanb "mryanb (1 commits)")[![shtse8](https://avatars.githubusercontent.com/u/8020099?v=4)](https://github.com/shtse8 "shtse8 (1 commits)")[![daigo75](https://avatars.githubusercontent.com/u/292434?v=4)](https://github.com/daigo75 "daigo75 (1 commits)")

---

Tags

parserhtmldom

### Embed Badge

![Health badge](/badges/torann-dom-parser/health.svg)

```
[![Health](https://phpackages.com/badges/torann-dom-parser/health.svg)](https://phpackages.com/packages/torann-dom-parser)
```

###  Alternatives

[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[paquettg/php-html-parser

An HTML DOM parser. It allows you to manipulate HTML. Find tags on an HTML page with selectors just like jQuery.

2.4k7.9M123](/packages/paquettg-php-html-parser)[sunra/php-simple-html-dom-parser

Composer adaptation of: A HTML DOM parser written in PHP5+ let you manipulate HTML in a very easy way! Require PHP 5+. Supports invalid HTML. Find tags on an HTML page with selectors just like jQuery. Extract contents from HTML in a single line.

1.3k9.4M61](/packages/sunra-php-simple-html-dom-parser)[simplehtmldom/simplehtmldom

A fast, simple and reliable HTML document parser for PHP.

1921.3M14](/packages/simplehtmldom-simplehtmldom)[scotteh/php-dom-wrapper

Simple DOM wrapper to select nodes using either CSS or XPath expressions and manipulate results quickly and easily.

1471.9M10](/packages/scotteh-php-dom-wrapper)[oscarotero/html-parser

Parse html strings to DOMDocument

165.0M1](/packages/oscarotero-html-parser)

PHPackages © 2026

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