PHPackages                             aayaresko/yii2-advanced-html-dom - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. aayaresko/yii2-advanced-html-dom

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

aayaresko/yii2-advanced-html-dom
================================

Yii2 "PHP Advanced HTML DOM Parser" based on "PHP Simple HTML DOM Parser"

0666PHP

Since Feb 19Pushed 8y ago1 watchersCompare

[ Source](https://github.com/aayaresko/yii2-advanced-html-dom)[ Packagist](https://packagist.org/packages/aayaresko/yii2-advanced-html-dom)[ RSS](/packages/aayaresko-yii2-advanced-html-dom/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

The goal of this project is to be a DOM-based drop-in replacement for PHP's simple html dom library.

*How To Use* - The same way as simple. If you use file/str\_get\_html then you don't need to change anything. If you are instantiating with `new simple_html_dom()` then you will need to change that to `new AdvancedHtmlDom()`

*What's Different* - Mostly just formatting (spaces) in the html. This is added by DOM and there's no way around it. Some non-standard selectors have been dropped but many more standard ones have been added. For example: `img[src!=foo]` was removed because it's not a valid selector. Added are things like `a + b` and `a ~ b` or even `a.foo:not(.bar)`

*What's Better*

- 10x-20x Performance increase
- Reduced memory requirement
- Support for many more css selectors

Features

- Supports full set of css pseudo selectors plus many jquery extras: :not, :has, :contains, :gt, :lt, :eq
- Use with css or xpath: $doc-&gt;find('h3 a'), $doc-&gt;find('//h3//a')
- Jquery-style functions replace, wrap, unwrap, before after
- Nodeset math: $doc-&gt;find('a')-&gt;minus($doc-&gt;find('.skip\_me'))
- Lots more features that haven't been documented yet.

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

[](#installation)

The preferred way to install extension is via [composer](http://getcomposer.org/download/). Check the [composer.json](https://github.com/aayaresko/yii2-advanced-html-dom/blob/master/composer.json) for this extension's requirements and dependencies.

To install, either run

```
$ php composer.phar require aayaresko/yii2-advanced-html-dom "*"

```

or add

```
"aayaresko/yii2-advanced-html-dom": "*"

```

to the `require` section of your `composer.json`.

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/06e7bed9064a58e5e46fb881990859f810313aa291b4000310f3a36de3b2d22a?d=identicon)[aayaresko](/maintainers/aayaresko)

---

Top Contributors

[![aayaresko](https://avatars.githubusercontent.com/u/8190713?v=4)](https://github.com/aayaresko "aayaresko (14 commits)")

### Embed Badge

![Health badge](/badges/aayaresko-yii2-advanced-html-dom/health.svg)

```
[![Health](https://phpackages.com/badges/aayaresko-yii2-advanced-html-dom/health.svg)](https://phpackages.com/packages/aayaresko-yii2-advanced-html-dom)
```

###  Alternatives

[kra8/laravel-snowflake

Snowflake for Laravel and Lumen.

192453.6k9](/packages/kra8-laravel-snowflake)[worksome/coding-style

Worksomes coding style

49814.9k66](/packages/worksome-coding-style)[fabianmichael/kirby-meta

Your all-in-one powerhouse for any SEO and metadata needs imaginable.

7011.5k1](/packages/fabianmichael-kirby-meta)

PHPackages © 2026

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