PHPackages                             coreconst/php-dom-plus - 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. [PDF &amp; Document Generation](/categories/documents)
4. /
5. coreconst/php-dom-plus

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

coreconst/php-dom-plus
======================

This library extends DOMDocument and adds methods similar to those found in native JavaScript.

v1.0.3(1y ago)09PHPPHP ^8.2

Since Aug 19Pushed 1y ago1 watchersCompare

[ Source](https://github.com/coreconst/php-dom-plus)[ Packagist](https://packagist.org/packages/coreconst/php-dom-plus)[ RSS](/packages/coreconst-php-dom-plus/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (4)Versions (5)Used By (0)

php-dom-plus
============

[](#php-dom-plus)

`php-dom-plus` is a PHP library that extends the native `DOMDocument` and `DOMElement` classes, bringing familiar JavaScript-like methods to PHP. It provides additional functionality for working with HTML documents.

Features
--------

[](#features)

- **JavaScript-like Methods**: Provides methods that mimic JavaScript's DOM API, including `querySelector`, `querySelectorAll`, `getElementsByClassName`.
- **Enhanced Element Handling**: Adds functionality for handling class names with methods like `classList.add`, `classList.remove`, and `classList.toggle`.
- **HTML Content Access**: Includes properties `innerHTML` and `outerHTML` for easily retrieving HTML content inside and around elements.

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

[](#installation)

```
composer require coreconst/php-dom-plus
```

Usage
-----

[](#usage)

```
use PhpDomPlus\Document;

$document = new Document();
$document->loadHTMLByUrl('http://example.com/');

$element = $document->querySelector('.example-class');
echo $element->innerHTML;

$element->classList->add('new-class');
echo $element->outerHTML;
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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

Every ~0 days

Total

4

Last Release

634d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2eb7494d45766f890ebb31bbee6900050a3f5df121461eab296f152b9274bf9e?d=identicon)[coreconst](/maintainers/coreconst)

---

Top Contributors

[![coreconst](https://avatars.githubusercontent.com/u/95091601?v=4)](https://github.com/coreconst "coreconst (25 commits)")

---

Tags

phpwebparserdomdocumentscraper

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/coreconst-php-dom-plus/health.svg)

```
[![Health](https://phpackages.com/badges/coreconst-php-dom-plus/health.svg)](https://phpackages.com/packages/coreconst-php-dom-plus)
```

###  Alternatives

[shuchkin/simplexlsx

Parse and retrieve data from Excel XLSx files. MS Excel 2007 workbooks PHP reader.

1.8k3.8M21](/packages/shuchkin-simplexlsx)[duzun/hquery

An extremely fast web scraper that parses megabytes of HTML in a blink of an eye. No dependencies. PHP5+

363146.3k4](/packages/duzun-hquery)[shuchkin/simplexls

Parse and retrieve data from old format Excel XLS files. MS Excel 97 workbooks PHP reader.

212588.3k2](/packages/shuchkin-simplexls)[avadim/fast-excel-reader

Lightweight and very fast XLSX Excel Spreadsheet Reader in PHP

104608.4k6](/packages/avadim-fast-excel-reader)[shuchkin/simplecsv

Parse and retrieve data from CSV files. Export data to CSV.

5192.4k](/packages/shuchkin-simplecsv)[tecnickcom/tc-lib-pdf-parser

PHP library to parse PDF documents

4092.8k](/packages/tecnickcom-tc-lib-pdf-parser)

PHPackages © 2026

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