PHPackages                             andig/php-html-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. andig/php-html-parser

ActiveLibrary

andig/php-html-parser
=====================

Refactored repack of https://github.com/hkk12369/php-html-parser

29.6k—0%1PHP

Since Jan 21Pushed 12y ago1 watchersCompare

[ Source](https://github.com/andig/php-html-parser)[ Packagist](https://packagist.org/packages/andig/php-html-parser)[ RSS](/packages/andig-php-html-parser/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

PHP HTML Parser
===============

[](#php-html-parser)

Build status: [![Build status](https://camo.githubusercontent.com/99f4ab3b3ceee7a705d8b8f137bf7ef42a2256b7b8fd9cac99758a505239721f/68747470733a2f2f7472617669732d63692e6f72672f616e6469672f7068702d68746d6c2d7061727365722e706e67)](https://travis-ci.org/andig/php-html-parser)

A simple and efficient DOMDocument based PHP HTML and XML Parser. It accepts both css selector and xpath queries to search the document and handles malformed HTML as well.

Example:

```
$html = HtmlParser::from_string('Some Text');
$text = $html->find('#outer .red', 0)->text;
echo $text;   // outputs "Some Text"
```

### Authors

[](#authors)

Originally source code taken from . Test cases and refactoring for composer/packagist by .

### Installation via Composer

[](#installation-via-composer)

Define the following requirement in your composer.json file:

```
{
    "require": {
        "andig/php-html-parser": "dev-master"
    }
}
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

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

### Community

Maintainers

![](https://www.gravatar.com/avatar/cd7fa540209d1f84d912060f58a094012a3b9a67739f1af9416c97b5873b0148?d=identicon)[andig](/maintainers/andig)

---

Top Contributors

[![hkk12369](https://avatars.githubusercontent.com/u/362021?v=4)](https://github.com/hkk12369 "hkk12369 (13 commits)")[![andig](https://avatars.githubusercontent.com/u/184815?v=4)](https://github.com/andig "andig (3 commits)")

### Embed Badge

![Health badge](/badges/andig-php-html-parser/health.svg)

```
[![Health](https://phpackages.com/badges/andig-php-html-parser/health.svg)](https://phpackages.com/packages/andig-php-html-parser)
```

PHPackages © 2026

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