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

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

magroski/diff
=============

A class containing a diff implementation

v1.0.0(7y ago)06MITPHPPHP ^7.1

Since May 17Pushed 7y ago1 watchersCompare

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

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

Diff
====

[](#diff)

[![Latest Stable Version](https://camo.githubusercontent.com/83d52325d4a394f890bb99f40d2d0aa94dcfb651800ae9bfca42dcba9b981bce/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6167726f736b692f646966662e7376673f7374796c653d666c6174)](https://packagist.org/packages/magroski/diff)[![Minimum PHP Version](https://camo.githubusercontent.com/7a09b828563f7738e2e72ec4aade8144538bf5d41e1e2e718815c57e3416089f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230372e312d3838393242462e7376673f7374796c653d666c6174)](https://php.net/)[![GitHub license](https://camo.githubusercontent.com/f48f8d6cf609f5b181b9c3218a85175fe8a5809c7ea400347f39697a5d55065d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c6174)](https://github.com/magroski/diff/blob/master/LICENSE)

This library is a modernized version of the Diff class originally implemented by Stephen Morley

Original disclaimer
-------------------

[](#original-disclaimer)

```
A class containing a diff implementation

Created by Stephen Morley - http://stephenmorley.org/ - and released under the terms of the CC0 1.0 Universal legal code

```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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

Unknown

Total

1

Last Release

2602d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2437681?v=4)[Lucas Magroski](/maintainers/magroski)[@magroski](https://github.com/magroski)

---

Top Contributors

[![magroski](https://avatars.githubusercontent.com/u/2437681?v=4)](https://github.com/magroski "magroski (2 commits)")

---

Tags

diff

###  Code Quality

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[jfcherng/php-diff

A comprehensive library for generating differences between two strings in multiple formats (unified, side by side HTML etc).

4785.8M65](/packages/jfcherng-php-diff)[caxy/php-htmldiff

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

21522.3M20](/packages/caxy-php-htmldiff)[localheinz/diff

Fork of sebastian/diff for use with ergebnis/composer-normalize

4739.7M9](/packages/localheinz-diff)[diff/diff

Small standalone library for representing differences between data structures, computing such differences, and applying them as patches

2031.7M14](/packages/diff-diff)[mkalkbrenner/php-htmldiff-advanced

An add-on for the php-htmldiff library for comparing two HTML files/snippets and highlighting the differences using simple HTML.

3618.9M1](/packages/mkalkbrenner-php-htmldiff-advanced)[yetanotherape/diff-match-patch

Port of the google-diff-match-patch (https://github.com/google/diff-match-patch) lib to PHP

158946.3k14](/packages/yetanotherape-diff-match-patch)

PHPackages © 2026

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