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

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

ilaoniu/diff
============

对比字符串生成差异，支持多种输出格式。

1.0.2(6y ago)01021MITPHP

Since Jul 29Pushed 6y ago1 watchersCompare

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

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

 Diff
======

[](#-diff-)

 对比字符串生成差异，支持多种输出格式。

Installing
----------

[](#installing)

```
$ composer require ilaoniu/diff
```

Usage
-----

[](#usage)

```
use Ilaoniu\Diff;

$diff = new Diff();
$result = $diff->calculate('old string', 'new string');

// Or

$result = app('diff')->calculate('old string', 'new string');
```

Contributing
------------

[](#contributing)

You can contribute in one of three ways:

1. File bug reports using the [issue tracker](https://github.com/ilaoniu/diff/issues).
2. Answer questions or fix bugs on the [issue tracker](https://github.com/ilaoniu/diff/issues).
3. Contribute new features or update the wiki.

*The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.*

License
-------

[](#license)

MIT

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

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

Total

3

Last Release

2482d ago

### Community

Maintainers

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

---

Top Contributors

[![ilaoniu](https://avatars.githubusercontent.com/u/9882927?v=4)](https://github.com/ilaoniu "ilaoniu (3 commits)")

### Embed Badge

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

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

###  Alternatives

[imarc/opus

Multi-framework asset and module packaging for composer

1112.1k3](/packages/imarc-opus)

PHPackages © 2026

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