PHPackages                             snebes/range-differencer - 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. snebes/range-differencer

ActiveLibrary

snebes/range-differencer
========================

Provides support for finding the differences between two or three sequences of comparable entities.

v1.0.0(7y ago)187[1 PRs](https://github.com/snebes/range-differencer/pulls)MITPHPPHP ^7.1.3

Since Jan 12Pushed 6y ago1 watchersCompare

[ Source](https://github.com/snebes/range-differencer)[ Packagist](https://packagist.org/packages/snebes/range-differencer)[ RSS](/packages/snebes-range-differencer/feed)WikiDiscussions master Synced 3d ago

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

Range Differencer
-----------------

[](#range-differencer)

[![PHP Version](https://camo.githubusercontent.com/26b48bbf076e561bfb5b61d84c313df0325058585becf0ab51c434ffe6adccd9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f736e656265732f72616e67652d646966666572656e6365722e7376673f6d61784167653d33363030)](https://packagist.org/packages/snebes/range-differencer)[![Latest Version](https://camo.githubusercontent.com/bb3030b1d9802cf9db2ea3ee37220ad99e0c0336428a0502af5a3479cafb976f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736e656265732f72616e67652d646966666572656e6365722e7376673f6d61784167653d33363030)](https://packagist.org/packages/snebes/range-differencer)[![Build Status](https://camo.githubusercontent.com/5b7b6280fb3f9fca90d0e574443a3dd3644cfe6e6db8cee8e742cdd15063a19d/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f6275696c642f672f736e656265732f72616e67652d646966666572656e6365722e7376673f6d61784167653d33363030)](https://scrutinizer-ci.com/g/snebes/range-differencer)[![Code Quality](https://camo.githubusercontent.com/9d2637de38c465b808901d46e11029607304f12773a372e463ad2e814a5448d6/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f736e656265732f72616e67652d646966666572656e6365722e7376673f6d61784167653d33363030)](https://scrutinizer-ci.com/g/snebes/range-differencer)[![Test Coverage](https://camo.githubusercontent.com/9a1cc3af7c678db889753d3abd17ec8941a7394183c6cfe42f19fc232ebbb7fe/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f736e656265732f72616e67652d646966666572656e6365722e7376673f6d61784167653d33363030)](https://scrutinizer-ci.com/g/snebes/range-differencer)

Provides support for finding the differences between two or three sequences of comparable entities.

### Specification

[](#specification)

The class RangeDifferencer finds longest sequences of matching and non-matching comparable entities. Clients must supply the input to the differencer as an implementation of the RangeComparatorInterface. An RangeComparatorInterface breaks the input data into a sequence of entities and provides a method for comparing one entity with the entity in another RangeComparatorInterface.

For example, to compare two text documents and find longest common sequences of matching and non-matching lines, the implementation of RangeComparatorInterface must break the document into lines and provide a method for testing whether two lines are considered equal. See TagComparator for how this can be done.

The differencer returns the differences among these sequences as an array of RangeDifference objects. Every single RangeDifference describes the kind of difference (no change, change, addition, deletion) and the corresponding ranges of the underlying comparable entities in the two or three inputs.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

Total

2

Last Release

2677d ago

Major Versions

v0.99 → v1.0.02019-01-15

PHP version history (2 changes)v0.99PHP ^7.1

v1.0.0PHP ^7.1.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/5258358106fcdbd7728a70ef6cd767f909673f6579f88bb86c86cb917231ae83?d=identicon)[snebes](/maintainers/snebes)

---

Top Contributors

[![snebes](https://avatars.githubusercontent.com/u/666333?v=4)](https://github.com/snebes "snebes (41 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/snebes-range-differencer/health.svg)

```
[![Health](https://phpackages.com/badges/snebes-range-differencer/health.svg)](https://phpackages.com/packages/snebes-range-differencer)
```

PHPackages © 2026

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