PHPackages                             codedruids/simple-diff - 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. codedruids/simple-diff

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

codedruids/simple-diff
======================

PHP class wrapper for simple diff operation.

v1.0.3(8y ago)115.1k↓43.8%ZlibPHPPHP &gt;=5.4.0

Since Dec 16Pushed 4y ago3 watchersCompare

[ Source](https://github.com/CodeDruids/simple-diff)[ Packagist](https://packagist.org/packages/codedruids/simple-diff)[ RSS](/packages/codedruids-simple-diff/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (2)Versions (5)Used By (0)

SimpleDiff
==========

[](#simplediff)

[![Latest release](https://camo.githubusercontent.com/e3430f743d1ce6b23ff3b26d8fc246a8adb5116406377204fddfaf2a38ab81d0/687474703a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f436f64654472756964732f73696d706c652d646966662e737667)](https://github.com/CodeDruids/simple-diff/releases)[![Build Status](https://camo.githubusercontent.com/0047e117af17e116610859355b66172d645dcabb1c0f2b3fa632be1a20a290d3/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f436f64654472756964732f73696d706c652d646966662f6d61737465722e737667)](https://travis-ci.org/CodeDruids/simple-diff)[![Code Coverage](https://camo.githubusercontent.com/ea316cdb07a216971e1af88f96576b832bc14594664f93bd652e9cfe9e296901/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f436f64654472756964732f73696d706c652d646966662e737667)](https://scrutinizer-ci.com/g/CodeDruids/simple-diff/)[![Code Quality](https://camo.githubusercontent.com/720c64662c6e5db2024a2dfd6620cfbfacc5361d535e537eb2677c1e75f4c57a/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f436f64654472756964732f73696d706c652d646966662e737667)](https://scrutinizer-ci.com/g/CodeDruids/simple-diff/)[![Software License](https://camo.githubusercontent.com/920835e1fc9671cfceaea372c58058766e322edcc8b5a720c510aeea6709c201/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d5a6c69622d626c75652e737667)](LICENSE)

SimpleDiff is a PHP class wrapper for a simple diffing algorithm.

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

[](#requirements)

- PHP 5.4 or higher

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

[](#installation)

Add the following to your `composer.json`:

```
{
    "require": {
        "CodeDruids/simple-diff": "1.*"
    }
}
```

Basic Usage
-----------

[](#basic-usage)

```
$old = ['some','array','of','stuff'];
$new = ['some','array','of','other','stuff'];

$diff = \CodeDruids\SimpleDiff::diff($old, $new);

$oldHtml = "Some HTML you simply cannot ignore!";
$newHtml = "Some HTML you just cannot ignore!";

$htmlDiff = \CodeDruids\SimpleDiff::htmlDiff($oldHtml, $newHmtl);
```

Support
-------

[](#support)

If you believe you have found a bug, please report it using the [GitHub issue tracker](https://github.com/CodeDruids/simple-diff/issues), or better yet, fork the library and submit a pull request.

###  Health Score

33

—

LowBetter than 73% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity61

Established project with proven stability

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

Total

4

Last Release

3052d ago

PHP version history (2 changes)v1.0.0PHP &gt;=5.3.0

v1.0.1PHP &gt;=5.4.0

### Community

Maintainers

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

---

Top Contributors

[![leith](https://avatars.githubusercontent.com/u/647389?v=4)](https://github.com/leith "leith (6 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/codedruids-simple-diff/health.svg)

```
[![Health](https://phpackages.com/badges/codedruids-simple-diff/health.svg)](https://phpackages.com/packages/codedruids-simple-diff)
```

###  Alternatives

[sbine/simple-tenancy

Simple Laravel multi-tenancy in the same database

373.6k](/packages/sbine-simple-tenancy)

PHPackages © 2026

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