PHPackages                             hack4mer/diffon - 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. hack4mer/diffon

ActiveLibrary

hack4mer/diffon
===============

A PHP library to find the differences between two given directories

v1.1.2(7y ago)022MITPHP

Since Oct 20Pushed 7y ago1 watchersCompare

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

READMEChangelog (1)DependenciesVersions (10)Used By (0)

Diffon
======

[](#diffon)

A PHP library to find the differences between two given directories

Gives following information about the directories:

- Files/Directories that exist in the first directory only.
- Files/Directories that exist in second directory only.
- Files/Directories that exist in both the directories.
- Files that exist in both the directories, but contain different data.

But, what about directories that exist in both the directories and contain different things? For that, we should implement Diffon with recursion in our code.

### Installation

[](#installation)

```
composer require hack4mer/diffon

```

### Usage

[](#usage)

Let's say you have two directories with following content:

```
dir1 => hack4mer.txt, github.txt, winter.txt
dir2 => hack4mer.txt (with different content), github.txt, summer.txt

```

To compare the directories with Diffon:

```

```

Output:

```
Array
(
    [only_in_source] => Array
        (
            [2] => winter.txt
        )

    [only_in_destination] => Array
        (
            [2] => summer.txt
        )

    [in_both] => Array
        (
            [0] => github.txt
            [1] => hack4mer.txt
        )

    [not_same] => Array
        (
            [1] => hack4mer.txt
        )

)

```

Notice the index of the array elements, they give information about the position of each file in given directories if sorted alphabetically.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity67

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

9

Last Release

2763d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8080a74dbbc9b364cb17535d839073b661858c23b857b2d062f4f9736918c8b5?d=identicon)[hack4mer](/maintainers/hack4mer)

---

Top Contributors

[![sudoanand](https://avatars.githubusercontent.com/u/13597555?v=4)](https://github.com/sudoanand "sudoanand (11 commits)")

### Embed Badge

![Health badge](/badges/hack4mer-diffon/health.svg)

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

PHPackages © 2026

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