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

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

bavix/advanced-html-dom
=======================

Bavix Advanced HTML DOM.

1.1.0(6y ago)37922MITPHPPHP ^7.1CI failing

Since Oct 13Pushed 1y ago1 watchersCompare

[ Source](https://github.com/bavix/advanced-html-dom)[ Packagist](https://packagist.org/packages/bavix/advanced-html-dom)[ Docs](https://github.com/bavix/advanced-html-dom)[ RSS](/packages/bavix-advanced-html-dom/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (13)Used By (0)

Advanced HTML DOM
=================

[](#advanced-html-dom)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/ce6afd7fcfec15e7425e3b8c89c9b9dcd89e1ea6a6ad536750446f7162ff7c44/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f62617669782f616476616e6365642d68746d6c2d646f6d2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/bavix/advanced-html-dom/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/017b958e5a53b317b8079accd9420ae04a87df5e4f3c14ddd203fe900aa5d276/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f62617669782f616476616e6365642d68746d6c2d646f6d2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/bavix/advanced-html-dom/?branch=master)[![Build Status](https://camo.githubusercontent.com/deaafa7de4019da0a50956344aa32ab4ddbdadee28910a2063a40e8bfa02bdaa/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f62617669782f616476616e6365642d68746d6c2d646f6d2f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/bavix/advanced-html-dom/build-status/master)[![Code Intelligence Status](https://camo.githubusercontent.com/1676fec42f780488467041b4eb83561fc303ccdbd430d9f798fec59679b807f8/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f62617669782f616476616e6365642d68746d6c2d646f6d2f6261646765732f636f64652d696e74656c6c6967656e63652e7376673f623d6d6173746572)](https://scrutinizer-ci.com/code-intelligence)

[![Package Rank](https://camo.githubusercontent.com/e47f76596820989e16c64ed55faf05abce881e7de99aa807ca9a58b95f3d7371/68747470733a2f2f7068707061636b616765732e6f72672f702f62617669782f616476616e6365642d68746d6c2d646f6d2f62616467652f72616e6b2e737667)](https://packagist.org/packages/bavix/advanced-html-dom)[![Latest Stable Version](https://camo.githubusercontent.com/20a66993b3981fad2f5ae6524ffc3dec1be1f9fd4122e843c180c46e156eff01/68747470733a2f2f706f7365722e707567782e6f72672f62617669782f616476616e6365642d68746d6c2d646f6d2f762f737461626c65)](https://packagist.org/packages/bavix/advanced-html-dom)[![Latest Unstable Version](https://camo.githubusercontent.com/a774c691224d943ac80e59501397dfb37a4a28a4aff154a8ed0b69a4ca8b6e1f/68747470733a2f2f706f7365722e707567782e6f72672f62617669782f616476616e6365642d68746d6c2d646f6d2f762f756e737461626c65)](https://packagist.org/packages/bavix/advanced-html-dom)[![License](https://camo.githubusercontent.com/e9e22a36c826121cdd751e4701c8f6b8a3a3cf5fd50c94047b572b1f6e925693/68747470733a2f2f706f7365722e707567782e6f72672f62617669782f616476616e6365642d68746d6c2d646f6d2f6c6963656e7365)](https://packagist.org/packages/bavix/advanced-html-dom)[![composer.lock](https://camo.githubusercontent.com/c40ff530d29cd5e97fd0a71512dc63e3472cd7f33a7857dad45b95376da8a1b9/68747470733a2f2f706f7365722e707567782e6f72672f62617669782f616476616e6365642d68746d6c2d646f6d2f636f6d706f7365726c6f636b)](https://packagist.org/packages/bavix/advanced-html-dom)

- **Vendor**: bavix
- **Package**: Advanced HTML DOM
- **Version**: [![Latest Stable Version](https://camo.githubusercontent.com/20a66993b3981fad2f5ae6524ffc3dec1be1f9fd4122e843c180c46e156eff01/68747470733a2f2f706f7365722e707567782e6f72672f62617669782f616476616e6365642d68746d6c2d646f6d2f762f737461626c65)](https://packagist.org/packages/bavix/advanced-html-dom)
- **PHP Version**: 7.1+
- **[Composer](https://getcomposer.org/):** `composer require bavix/advanced-html-dom`

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->find('h3 a'), $doc->find('//h3//a')`
- Jquery-style functions replace, wrap, unwrap, before after
- Nodeset math: `$doc->find('a')->minus($doc->find('.skip_me'))`
- Lots of stuff that even BeautifulSoup and Nokogiri can't do: `$doc->search('span:lt(7):not(.foo)')`
- Lots more features that haven't been documented yet.

How to install it via composer
==============================

[](#how-to-install-it-via-composer)

```
composer req bavix/advanced-html-dom
```

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 64.6% 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 ~92 days

Recently: every ~154 days

Total

10

Last Release

2303d ago

PHP version history (2 changes)1.0.0PHP ^7.0

1.0.2PHP ^7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/266f28651b740a279e636ef42fadcc7d72941c7a4bf9a29c4fd62c72476f0c0e?d=identicon)[REZ1DENT3](/maintainers/REZ1DENT3)

---

Top Contributors

[![rez1dent3](https://avatars.githubusercontent.com/u/5111255?v=4)](https://github.com/rez1dent3 "rez1dent3 (51 commits)")[![pguardiario](https://avatars.githubusercontent.com/u/58795222?v=4)](https://github.com/pguardiario "pguardiario (19 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (4 commits)")[![jhuebner](https://avatars.githubusercontent.com/u/734277?v=4)](https://github.com/jhuebner "jhuebner (2 commits)")[![mend-bolt-for-github[bot]](https://avatars.githubusercontent.com/in/16809?v=4)](https://github.com/mend-bolt-for-github[bot] "mend-bolt-for-github[bot] (1 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")[![sunaram](https://avatars.githubusercontent.com/u/2225482?v=4)](https://github.com/sunaram "sunaram (1 commits)")

---

Tags

advanceddomhtmlphpsimple-html-parsersimplehtmldomparsercsshtmldomadvancedselector

### Embed Badge

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

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

###  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)[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)[rct567/dom-query

DomQuery is a PHP library that allows easy 'jQuery like' DOM traversing and manipulation

134261.0k4](/packages/rct567-dom-query)[simplehtmldom/simplehtmldom

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

1921.3M14](/packages/simplehtmldom-simplehtmldom)

PHPackages © 2026

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