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

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

charliekassel/array-diff
========================

Find the difference between two array's

0.0.2(8y ago)5136.7k2MITPHPPHP &gt;=7.0.0

Since Feb 3Pushed 8y ago2 watchersCompare

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

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

ArrayDiff
=========

[](#arraydiff)

[![](https://camo.githubusercontent.com/1028899bcc1dcf638d2ec89baf74f4e72bae9b5a541caa78e5be8eb97decb15e/68747470733a2f2f7472617669732d63692e6f72672f636861726c69656b617373656c2f61727261792d646966662e7376673f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/1028899bcc1dcf638d2ec89baf74f4e72bae9b5a541caa78e5be8eb97decb15e/68747470733a2f2f7472617669732d63692e6f72672f636861726c69656b617373656c2f61727261792d646966662e7376673f6272616e63683d6d6173746572) [![Coverage Status](https://camo.githubusercontent.com/34acca177e15dbdcd73424c6c06556a001565ec89de00558c9e3fcc7d36d6568/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f636861726c69656b617373656c2f61727261792d646966662f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/charliekassel/array-diff?branch=master)

Compute the changes between two arrays.

Work in progress.

Given two arrays:

```
$old = [
	'a' => 1,
	'b' => 2,
	'c' => 3
];
$new = [
	'b' => 2,
	'c' => 5
]
```

We should expect an output of:

```
$differ = new \Differ\ArrayDiff();
$difference = $differ->diff($old, $new);

var_dump($difference);

array(3) {
  'added' =>
  array(0) {
  }
  'removed' =>
  array(1) {
    'a' =>
    int(1)
  }
  'changed' =>
  array(1) {
    'c' =>
    array(2) {
      'old' =>
      int(3)
      'new' =>
      int(5)
    }
  }
}
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

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

Total

2

Last Release

3010d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5c9842a9f873a32e2294af97cb04e26149ab64c3d754f309f4f1f2960150ca82?d=identicon)[charliekassel](/maintainers/charliekassel)

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[doctrine/event-manager

The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.

6.1k501.1M115](/packages/doctrine-event-manager)[symfony/polyfill-php81

Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions

885425.7M173](/packages/symfony-polyfill-php81)[react/child-process

Event-driven library for executing child processes with ReactPHP.

34076.1M136](/packages/react-child-process)

PHPackages © 2026

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