PHPackages                             scotteh/php-dom-wrapper - 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. scotteh/php-dom-wrapper

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

scotteh/php-dom-wrapper
=======================

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

3.0.2(2mo ago)1471.9M—3.5%35[4 issues](https://github.com/scotteh/php-dom-wrapper/issues)10BSD-3-ClausePHPPHP &gt;=8.0.0CI passing

Since May 6Pushed 2mo ago8 watchersCompare

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

READMEChangelog (3)Dependencies (6)Versions (39)Used By (10)

PHP DOM Wrapper
===============

[](#php-dom-wrapper)

Intro
-----

[](#intro)

PHP DOM Wrapper is a simple DOM wrapper library to manipulate and traverse HTML documents. Based around jQuery's manipulation and traversal methods, largely mimicking the behaviour of it's jQuery counterparts.

Author
------

[](#author)

- Andrew Scott ()

Requirements
------------

[](#requirements)

- PHP 8.0 or later
- PSR-4 compatible autoloader

Install
-------

[](#install)

Install with [Composer](https://getcomposer.org/doc/).

```
composer require scotteh/php-dom-wrapper

```

Autoloading
-----------

[](#autoloading)

This library requires an autoloader, if you aren't already using one you can include [Composers autoloader](https://getcomposer.org/doc/01-basic-usage.md#autoloading).

```
require 'vendor/autoload.php';
```

Methods
-------

[](#methods)

### Manipulation

[](#manipulation)

MethodjQuery Equivalent *(if different)*[addClass()](#addClass)[follow()](#follow)*after()*[appendWith()](#appendWith)*append()*[appendTo()](#appendTo)[attr()](#attr)[clone()](#clone)[destroy()](#destroy)*remove()*[detach()](#detach)[empty()](#empty)[hasClass()](#hasClass)[html()](#html)[precede()](#precede)*before()*[prependWith()](#prependWith)*prepend()*[prependTo()](#prependTo)[removeAttr()](#removeAttr)[removeClass()](#removeClass)[substituteWith()](#substituteWith)*replaceWith()*[text()](#text)[unwrap()](#unwrap)[wrap()](#wrap)[wrapAll()](#wrapAll)[wrapInner()](#wrapInner)### Traversal

[](#traversal)

MethodjQuery Equivalent *(if different)*[add()](#add)[children()](#children)[closest()](#closest)[contents()](#contents)[eq()](#eq)[filter()](#filter)[find()](#find)[first()](#first)[has()](#has)[is()](#is)[last()](#last)[map()](#map)[following()](#following)*next()*[followingAll()](#followingAll)*nextAll()*[followingUntil()](#followingUntil)*nextUntil()*[not()](#not)[parent()](#parent)[parents()](#parents)[parentsUntil()](#parentsUntil)[preceding()](#preceding)*prev()*[precedingAll()](#precedingAll)*prevAll()*[precedingUntil()](#precedingUntil)*prevUntil()*[siblings()](#siblings)[slice()](#slice)### Other

[](#other)

MethodjQuery Equivalent *(if different)*[count()](#count)*length* (property)[each()](#each)Usage
-----

[](#usage)

Example #1:

```
use DOMWrap\Document;

$html = 'FirstSecondThird';

$doc = new Document();
$doc->html($html);
$nodes = $doc->find('li');

// Returns '3'
var_dump($nodes->count());

// Append as a child node to each
$nodes->appendWith('!');

// Returns: First!Second!Third!
var_dump($doc->html());
```

---

Methods
-------

[](#methods-1)

### Manipulation

[](#manipulation-1)

#### addClass

[](#addclass)

```
self addClass(string|callable $class)

```

##### Example

[](#example)

```
$doc = (new Document())->html('first paragraphsecond paragraph');
$doc->find('p')->addClass('text-center');
```

*Result:*

```
first paragraphsecond paragraph
```

---

#### follow

[](#follow)

```
self follow(string|NodeList|\DOMNode|callable $input)

```

Insert the argument as a sibling directly after each of the nodes operated on.

##### Example

[](#example-1)

```
$doc = (new Document())->html('firstsecond');
$doc->find('li')->first()->follow('first-and-a-half');
```

*Result:*

```

    first
    first-and-a-half
    second

```

---

#### appendWith

[](#appendwith)

```
self appendWith(string|NodeList|\DOMNode|callable $input)

```

##### Example

[](#example-2)

```
$doc = (new Document())->html('The quick brown fox jumps over the lazy dog');
$doc->find('div')->appendWith(' Appended!');
```

*Result:*

```
The quick brown fox jumps over the lazy dog Appended!
```

---

#### appendTo

[](#appendto)

```
self appendTo(string|NodeList|\DOMNode $selector)

```

##### Example

[](#example-3)

```
$doc = (new Document())->html('The quick brown fox jumps over the lazy dog');
$doc->create(' Appended!')->appendTo('div');
```

*Result:*

```
The quick brown fox jumps over the lazy dog Appended!
```

---

#### attr

[](#attr)

```
self|string attr(string $name[, mixed $value = null])

```

##### Example #1 (Set)

[](#example-1-set)

```
$doc = (new Document())->html('');
$doc->attr('class', 'text-left');
```

*Result:*

```

```

##### Example #2 (Get)

[](#example-2-get)

```
$doc = (new Document())->html('');
echo $doc->attr('text-center');
```

*Result:*

```
text-center
```

---

#### precede

[](#precede)

```
self precede(string|NodeList|\DOMNode|callable $input)

```

Insert the argument as a sibling just before each of the nodes operated on.

##### Example

[](#example-4)

```
$doc = (new Document())->html('firstsecond');
doc->find('li')->first()->precede('zeroth');
```

*Result:*

```

    zeroth
    first
    second

```

---

#### clone

[](#clone)

```
NodeList|\DOMNode clone()

```

##### Example

[](#example-5)

```
$doc = (new Document())->html('Item');
$doc->find('div')->clone()->appendTo('ul');
```

*Result:*

```
ItemItem
```

---

#### destroy

[](#destroy)

```
self destroy([string $selector = null])

```

##### Example

[](#example-6)

```
$doc = (new Document())->html('');
$doc->find('.first')->destroy();
```

*Result:*

```

```

---

#### detach

[](#detach)

```
NodeList detach([string $selector = null])

```

##### Example

[](#example-7)

```
$doc = (new Document())->html('Item');
$el = $doc->find('ul.first li')->detach();
$doc->first('ul.second').append($el);
```

*Result:*

```
Item
```

---

#### empty

[](#empty)

```
self empty()

```

##### Example

[](#example-8)

```
$doc = (new Document())->html('The quick brown fox jumps over the lazy dog');
$doc->find('div')->empty();
```

*Result:*

```

```

---

#### hasClass

[](#hasclass)

```
bool hasClass(string $class)

```

##### Example

[](#example-9)

```
$doc = (new Document())->html('');
echo $doc->first('div')->hasClass('text-center');
```

*Result:*

```
true
```

---

#### html

[](#html)

```
string|self html([string|NodeList|\DOMNode|callable $input = null])

```

##### Example #1 (Set)

[](#example-1-set-1)

```
$doc = (new Document());
$doc->html('');
```

*Result:*

```

```

##### Example #1 (Get)

[](#example-1-get)

```
$doc = (new Document())->html('');
$doc->find('div')->appendWith('Example!');
echo $doc->html();
```

*Result:*

```
Example!
```

---

#### prependWith

[](#prependwith)

```
self prependWith(string|NodeList|\DOMNode|callable $input)

```

##### Example

[](#example-10)

```
$doc = (new Document())->html('The quick brown fox jumps over the lazy dog');
$doc->find('div')->prependWith('Prepended! ');
```

*Result:*

```
Prepended! The quick brown fox jumps over the lazy dog
```

---

#### prependTo

[](#prependto)

```
self prependTo(string|NodeList|\DOMNode $selector)

```

##### Example

[](#example-11)

```
$doc = (new Document())->html('The quick brown fox jumps over the lazy dog');
$doc->create('Prepended! ')->appendTo('div');
```

*Result:*

```
Prepended! The quick brown fox jumps over the lazy dog
```

---

#### removeAttr

[](#removeattr)

```
self removeAttr(string $name)

```

##### Example

[](#example-12)

```
$doc = (new Document())->html('');
$doc->find('div').removeAttr('class');
```

*Result:*

```

```

---

#### removeClass

[](#removeclass)

```
self removeClass(string|callable $class)

```

##### Example

[](#example-13)

```
$doc = (new Document())->html('');
$doc->find('div').removeClass('first');
```

*Result:*

```

```

---

#### substituteWith

[](#substitutewith)

```
self substituteWith(string|NodeList|\DOMNode|callable $input)

```

Replace each node in the current set with the contents provided.

##### Example

[](#example-14)

```
$doc = (new Document())->html('Hello World!');
$doc->find('b')->substituteWith(function($node) {
    return '' . $node->text() . '';
});
echo $doc->html();
```

*Result:*

```
Hello World!
```

---

#### text

[](#text)

```
string|self text([string|NodeList|\DOMNode|callable $input = null])

```

Get the text contents of the current set.

##### Example (get)

[](#example-get)

```
$doc = (new Document())->html('Hello World!');
echo $doc->find('.text')->text();
```

*Result:*

```
Hello World!
```

Set the text contents for current set.

##### Example (set)

[](#example-set)

```
$doc = (new Document())->html('The quick brown fox jumps over the lazy dog');
$doc->find('.text')->text('Hello World!');
echo $doc->html();
```

*Result:*

```
Hello World!
```

---

#### unwrap

[](#unwrap)

```
self unwrap()

```

Unwrap each current node by removing its parent, replacing the parent with its children (i.e. the current node and its siblings).

Note that each node is operated on separately, so when you call `unwrap()` on a `NodeList` containing two siblings, *two* parents will be removed.

##### Example

[](#example-15)

```
$doc = (new Document())->html('');
$doc->find('#first')->unwrap();
```

*Result:*

```

```

---

#### wrap

[](#wrap)

```
self wrap(string|NodeList|\DOMNode|callable $input)

```

Wrap the current node or nodes in the given structure.

The wrapping structure can be nested, but should only contain one node on each level (any extra siblings are removed). The outermost node replaces the node operated on, while the node operated on is put into the innermost node.

If called on a `NodeList`, each of nodes in the list will be separately wrapped. When such a list contains multiple nodes, the argument to wrap() cannot be a `NodeList` or `\DOMNode`, since those can be used to wrap a node only once. A string or callable returning a string or a unique `NodeList` or `\DomNode` every time can be used in this case.

When a callable is passed, it is called once for each node operated on, passing that node and its index. The callable should return either a string, or a unique `NodeList` or `\DOMNode` ever time it is called.

Note that this returns the original node like all other methods, not the (new) node(s) wrapped around it.

##### Example

[](#example-16)

```
$doc = (new Document())->html('foobar');
$doc->find->('span')->wrap('');
```

*Result:*

```
foo
bar
```

---

#### wrapAll

[](#wrapall)

```
self wrapAll(string|NodeList|\DOMNode|callable $input)

```

Like [wrap()](#wrap), but when operating on multiple nodes, all of them will be wrapped together in a single instance of the given structure, rather than each of them individually.

Note that the wrapping structure replaces the first node operated on, so if the other nodes operated on are not siblings of the first, they will be moved inside the document.

##### Example

[](#example-17)

```
$doc = (new Document())->html('foobar');
$doc->find->('span')->wrapAll('');
```

*Result:*

```

    foo
    bar

```

---

#### wrapInner

[](#wrapinner)

```
self wrapInner(string|NodeList|\DOMNode|callable $input)

```

Like [wrap()](#wrap), but rather than wrapping the nodes that are being operated on, this wraps their contents.

##### Example

[](#example-18)

```
$doc = (new Document())->html('foobar');
$doc->find('span')->wrapInner('');
```

*Result:*

```
foo
bar
```

---

### Traversal

[](#traversal-1)

#### add

[](#add)

```
NodeList add(string|NodeList|\DOMNode $input)

```

Add additional node(s) to the existing set.

##### Example

[](#example-19)

```
$nodes = $doc->find('a');
$nodes->add($doc->find('p'));
```

---

#### children

[](#children)

```
NodeList children()

```

Return all children of each element node in the current set.

##### Example

[](#example-20)

```
$nodes = $doc->find('p');
$childrenOfParagraphs = $nodes->children();
```

---

#### closest

[](#closest)

```
Element|NodeList|null closest(string|NodeList|\DOMNode|callable $input)

```

Return the first element matching the supplied input by traversing up through the ancestors of each node in the current set.

##### Example

[](#example-21)

```
$nodes = $doc->find('a');
$closestAncestors = $nodes->closest('p');
```

---

#### contents

[](#contents)

```
NodeList contents()

```

Return all children of each node in the current set.

##### Example

[](#example-22)

```
$nodes = $doc->find('p');
$contents = $nodes->contents();
```

---

#### eq

[](#eq)

```
\DOMNode|null eq(int $index)

```

Return node in the current set at the specified index.

##### Example

[](#example-23)

```
$nodes = $doc->find('a');
$nodeAtIndexOne = $nodes->eq(1);
```

---

#### filter

[](#filter)

```
NodeList filter(string|NodeList|\DOMNode|callable $input)

```

Return nodes in the current set that match the input.

##### Example

[](#example-24)

```
$nodes = $doc->filter('a')
$exampleATags = $nodes->filter('[href*=https://example.org/]');
```

---

#### find

[](#find)

```
NodeList find(string $selector[, string $prefix = 'descendant::'])

```

Return the decendants of the current set filtered by the selector and optional XPath axes.

##### Example

[](#example-25)

```
$nodes = $doc->find('a');
```

---

#### first

[](#first)

```
mixed first()

```

Return the first node of the current set.

##### Example

[](#example-26)

```
$nodes = $doc->find('a');
$firstNode = $nodes->first();
```

---

#### has

[](#has)

```
NodeList has(string|NodeList|\DOMNode|callable $input)

```

Return nodes with decendants of the current set matching the input.

##### Example

[](#example-27)

```
$nodes = $doc->find('a');
$anchorTags = $nodes->has('span');
```

---

#### is

[](#is)

```
bool is(string|NodeList|\DOMNode|callable $input)

```

Test if nodes from the current set match the input.

##### Example

[](#example-28)

```
$nodes = $doc->find('a');
$isAnchor = $nodes->is('[anchor]');
```

---

#### last

[](#last)

```
mixed last()

```

Return the last node of the current set.

##### Example

[](#example-29)

```
$nodes = $doc->find('a');
$lastNode = $nodes->last();
```

---

#### map

[](#map)

```
NodeList map(callable $function)

```

Apply a callback to nodes in the current set and return a new NodeList.

##### Example

[](#example-30)

```
$nodes = $doc->find('a');
$nodeValues = $nodes->map(function($node) {
    return $node->nodeValue;
});
```

---

#### following

[](#following)

```
\DOMNode|null following([string|NodeList|\DOMNode|callable $selector = null])

```

Return the sibling immediately following each element node in the current set.

*Optionally filtered by selector.*

##### Example

[](#example-31)

```
$nodes = $doc->find('a');
$follwingNodes = $nodes->following();
```

---

#### followingAll

[](#followingall)

```
NodeList followingAll([string|NodeList|\DOMNode|callable $selector = null])

```

Return all siblings following each element node in the current set.

*Optionally filtered by selector.*

##### Example

[](#example-32)

```
$nodes = $doc->find('a');
$follwingAllNodes = $nodes->followingAll('[anchor]');
```

---

#### followingUntil

[](#followinguntil)

```
NodeList followingUntil([[string|NodeList|\DOMNode|callable $input = null], string|NodeList|\DOMNode|callable $selector = null])

```

Return all siblings following each element node in the current set upto but not including the node matched by $input.

*Optionally filtered by input.*
*Optionally filtered by selector.*

##### Example

[](#example-33)

```
$nodes = $doc->find('a');
$follwingUntilNodes = $nodes->followingUntil('.submit');
```

---

#### not

[](#not)

```
NodeList not(string|NodeList|\DOMNode|callable $input)

```

Return element nodes from the current set not matching the input.

##### Example

[](#example-34)

```
$nodes = $doc->find('a');
$missingHrefAttribute = $nodes->not('[href]');
```

---

#### parent

[](#parent)

```
Element|NodeList|null parent([string|NodeList|\DOMNode|callable $selector = null])

```

Return the immediate parent of each element node in the current set.

*Optionally filtered by selector.*

##### Example

[](#example-35)

```
$nodes = $doc->find('a');
$parentNodes = $nodes->parent();
```

---

#### parents

[](#parents)

```
NodeList parent([string $selector = null])

```

Return the ancestors of each element node in the current set.

*Optionally filtered by selector.*

##### Example

[](#example-36)

```
$nodes = $doc->find('a');
$ancestorDivNodes = $nodes->parents('div');
```

---

#### parentsUntil

[](#parentsuntil)

```
NodeList parentsUntil([[string|NodeList|\DOMNode|callable $input, [string|NodeList|\DOMNode|callable $selector = null])

```

Return the ancestors of each element node in the current set upto but not including the node matched by $selector.

*Optionally filtered by input.*
*Optionally filtered by selector.*

##### Example

[](#example-37)

```
$nodes = $doc->find('a');
$ancestorDivNodes = $nodes->parentsUntil('div');
```

---

#### preceding

[](#preceding)

```
\DOMNode|null preceding([string|NodeList|\DOMNode|callable $selector = null])

```

Return the sibling immediately preceding each element node in the current set.

*Optionally filtered by selector.*

##### Example

[](#example-38)

```
$nodes = $doc->find('a');
$precedingNodes = $nodes->preceding();
```

---

#### precedingAll

[](#precedingall)

```
NodeList precedingAll([string|NodeList|\DOMNode|callable $selector = null])

```

Return all siblings preceding each element node in the current set.

*Optionally filtered by selector.*

##### Example

[](#example-39)

```
$nodes = $doc->find('a');
$precedingAllNodes = $nodes->precedingAll('[anchor]');
```

---

#### precedingUntil

[](#precedinguntil)

```
NodeList precedingUntil([[string|NodeList|\DOMNode|callable $input = null], string|NodeList|\DOMNode|callable $selector = null])

```

Return all siblings preceding each element node in the current set upto but not including the node matched by $input.

*Optionally filtered by input.*
*Optionally filtered by selector.*

##### Example

[](#example-40)

```
$nodes = $doc->find('a');
$precedingUntilNodes = $nodes->precedingUntil('.submit');
```

---

#### siblings

[](#siblings)

```
NodeList siblings([[string|NodeList|\DOMNode|callable $selector = null])

```

Return siblings of each element node in the current set.

*Optionally filtered by selector.*

##### Example

[](#example-41)

```
$nodes = $doc->find('p');
$siblings = $nodes->siblings();
```

---

#### slice

[](#slice)

```
NodeList slice(int $start[, int $end])

```

Return a subset of the current set based on the start and end indexes.

##### Example

[](#example-42)

```
$nodes = $doc->find('p');
// Return nodes 1 through to 3 as a new NodeList
$slicedNodes = $nodes->slice(1, 3);
```

---

### Additional Methods

[](#additional-methods)

#### count

[](#count)

```
int count()

```

Return number of nodes in the current set

##### Example

[](#example-43)

```
$nodes = $doc->find('p');

echo $nodes->count();
```

---

#### each

[](#each)

```
self each(callable $function)

```

Iterate through for each item in the existing set via callback

##### Example

[](#example-44)

```
$nodes = $doc->find('p');

$nodes->each(function($node){
    echo $node->nodeName . "\n";
});
```

Licensing
---------

[](#licensing)

PHP DOM Wrapper is licensed by Andrew Scott under the BSD 3-Clause License, see the LICENSE file for more details.

###  Health Score

67

—

FairBetter than 100% of packages

Maintenance84

Actively maintained with recent releases

Popularity57

Moderate usage in the ecosystem

Community32

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor3

3 contributors hold 50%+ of commits

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 ~109 days

Recently: every ~227 days

Total

37

Last Release

77d ago

Major Versions

0.7.3 → 1.0.02018-02-14

1.2.1 → 2.0.02021-01-24

2.0.5 → 3.0.02024-02-21

PHP version history (4 changes)0.1.0PHP &gt;=5.4.0

0.7.0PHP &gt;=5.5.9

1.0.0PHP &gt;=7.1.0

3.0.0PHP &gt;=8.0.0

### Community

Maintainers

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

---

Top Contributors

[![scotteh](https://avatars.githubusercontent.com/u/255294?v=4)](https://github.com/scotteh "scotteh (5 commits)")[![rafwell](https://avatars.githubusercontent.com/u/2893078?v=4)](https://github.com/rafwell "rafwell (3 commits)")[![matthijskooijman](https://avatars.githubusercontent.com/u/194491?v=4)](https://github.com/matthijskooijman "matthijskooijman (2 commits)")[![shaneiseminger](https://avatars.githubusercontent.com/u/843313?v=4)](https://github.com/shaneiseminger "shaneiseminger (2 commits)")[![MonsieurV](https://avatars.githubusercontent.com/u/1753348?v=4)](https://github.com/MonsieurV "MonsieurV (2 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")[![wadjei](https://avatars.githubusercontent.com/u/344321?v=4)](https://github.com/wadjei "wadjei (1 commits)")[![dependabot-support](https://avatars.githubusercontent.com/u/112581971?v=4)](https://github.com/dependabot-support "dependabot-support (1 commits)")[![karneds](https://avatars.githubusercontent.com/u/668462?v=4)](https://github.com/karneds "karneds (1 commits)")[![mhugot](https://avatars.githubusercontent.com/u/3684974?v=4)](https://github.com/mhugot "mhugot (1 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (1 commits)")

---

Tags

autoloadercomposerdomdom-wrapper-libraryhtmlmanipulationparserphpphp-dom-wrappertraversaltraverse-html-documentsparsercsshtmldomwrapper

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/scotteh-php-dom-wrapper/health.svg)

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

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

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

134261.0k4](/packages/rct567-dom-query)[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)
