PHPackages                             chita/phpdiff - 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. chita/phpdiff

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

chita/phpdiff
=============

Diff implementation written in PHP, supporting two and three-way diff generation

v2.0.1(2y ago)1268[1 issues](https://github.com/CHItA/PHPDiff/issues)MITPHPPHP &gt;=7.1

Since May 15Pushed 2y ago1 watchersCompare

[ Source](https://github.com/CHItA/PHPDiff)[ Packagist](https://packagist.org/packages/chita/phpdiff)[ Docs](https://github.com/CHItA/PHPDiff)[ RSS](/packages/chita-phpdiff/feed)WikiDiscussions master Synced today

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

About
-----

[](#about)

PHPDiff is diff/merge library written in PHP which supports both two and three-way merging. This library is currently in the alpha stage.

**Features**:

- Two-way diffing/merging
- Three-way diffing/merging
    - Using Weave merge algorithm
    - Using Three-way merge algorithm
- Custom comparison implementations

You can find the full feature list and the changes made to this library in the [changelog](CHANGELOG.md).

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

[](#requirements)

PHP 7.1.0 or higher is required (although it should run on 5.4 as well probably).

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

[](#installation)

You may install PHPDiff with composer by running the following commands in your console:

```
php composer.phar require chita/phpdiff:2.*

```

Documentation
-------------

[](#documentation)

For examples and documentation you may wish to read the [docs](http://phpdiff.readthedocs.io/en/latest/).

Versioning
----------

[](#versioning)

PHPDiff uses [semantic versioning](http://semver.org/).

Tests
-----

[](#tests)

PHPDiff uses automated tests to prevent code regressions.

v2.0: [![v2.0](https://github.com/CHItA/TopologicalSort/workflows/Tests/badge.svg?branch=v2.0)](https://github.com/CHItA/TopologicalSort/workflows/Tests/badge.svg?branch=v2.0)master [![master](https://github.com/CHItA/TopologicalSort/workflows/Tests/badge.svg?branch=master)](https://github.com/CHItA/TopologicalSort/workflows/Tests/badge.svg?branch=master)License
-------

[](#license)

PHPDiff is available under the [MIT License](LICENSE).

Contributions
-------------

[](#contributions)

If you have some code you would like to contribute to the project, please note that this project uses the PSR-2 coding standard, and the PSR-4 autoloading standard.

Contributions to the documentation, tests or to the code, or simply reporting issues here are welcomed, and very much appreciated.

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

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

Total

5

Last Release

1003d ago

Major Versions

v1.0.x-dev → v2.0.12023-10-01

PHP version history (2 changes)v1.0.0-a1PHP &gt;=5.4.0

v2.0.1PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/29b2c36cd2fd4bafad5717061ce4ba90075acdae6329dfd1026bcfd03fd658c2?d=identicon)[CHItA](/maintainers/CHItA)

---

Top Contributors

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

---

Tags

diffThree-way diff

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/chita-phpdiff/health.svg)

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

###  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.

22322.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

2131.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)
