PHPackages                             friedolinfoerder/html-changer - 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. friedolinfoerder/html-changer

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

friedolinfoerder/html-changer
=============================

Parse html and change it's output

v0.1.6(4y ago)17.0k↓58.3%[1 issues](https://github.com/friedolinfoerder/html-changer/issues)MITPHPPHP &gt;=5.5.0

Since Mar 1Pushed 4y agoCompare

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

READMEChangelogDependencies (1)Versions (18)Used By (0)

HTML Changer
============

[](#html-changer)

With this tiny library you can parse html code and change it's output. Other than many other similar modules, this library do not change the existing code while parsing. So you can only change the parts you need to change, while leaving all other code as is.

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

[](#installation)

```
composer require friedolinfoerder/html-changer
```

Usage
-----

[](#usage)

```
use html_changer\HtmlChanger

// parse html
$htmlChanger = new HtmlChanger($html);

// search and replace text
$htmlChanger = new HtmlChanger($text, [
    'search' => [
        'test' => [
            'value' => 'TEST',
            'caseInsensitive' => false, // default false
            'wordBoundary' => true, // default true
            'group' => 1, // default is the key (here 'test')
            'maxCount' => 3, // default -1, means no rescriction
        ]
    ],
    'ignore' => [
        'b',
        'h1',
        'h2',
        'a',
        '.ignored',
        '#ad',
    ]
]);
$htmlChanger->replace(function ($text, $value) {
    return $text . '/' . $value;
});

// print html code
print $htmlChanger->html();
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

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

Recently: every ~62 days

Total

17

Last Release

1681d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/00ac8f36d981c1499ba786b7ca344489a89451cf8ffc60a29b228bba0525e354?d=identicon)[friedolinfoerder](/maintainers/friedolinfoerder)

---

Top Contributors

[![friedolinfoerder](https://avatars.githubusercontent.com/u/2007941?v=4)](https://github.com/friedolinfoerder "friedolinfoerder (15 commits)")

---

Tags

htmlmanipulatechange

### Embed Badge

![Health badge](/badges/friedolinfoerder-html-changer/health.svg)

```
[![Health](https://phpackages.com/badges/friedolinfoerder-html-changer/health.svg)](https://phpackages.com/packages/friedolinfoerder-html-changer)
```

###  Alternatives

[spatie/laravel-html

A fluent html builder

8376.4M72](/packages/spatie-laravel-html)[ckeditor/ckeditor

JavaScript WYSIWYG web text editor.

5234.2M76](/packages/ckeditor-ckeditor)[caxy/php-htmldiff

A library for comparing two HTML files/snippets and highlighting the differences using simple HTML.

21320.9M15](/packages/caxy-php-htmldiff)[yajra/laravel-datatables-html

Laravel DataTables HTML builder plugin

2899.6M48](/packages/yajra-laravel-datatables-html)[wa72/htmlpagedom

jQuery-inspired DOM manipulation extension for Symfony's Crawler

3383.9M34](/packages/wa72-htmlpagedom)[tinymce/tinymce

Web based JavaScript HTML WYSIWYG editor control.

1697.5M106](/packages/tinymce-tinymce)

PHPackages © 2026

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