PHPackages                             ernilambar/difftor - 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. ernilambar/difftor

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

ernilambar/difftor
==================

Diff helper - Compare two sources (URLs, directories, or zip files) and generate an HTML diff file.

2.0.0(1mo ago)012MITPHPPHP &gt;=8.3CI passing

Since Dec 1Pushed 1mo agoCompare

[ Source](https://github.com/ernilambar/difftor)[ Packagist](https://packagist.org/packages/ernilambar/difftor)[ Docs](https://github.com/ernilambar/difftor)[ RSS](/packages/ernilambar-difftor/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (15)Versions (4)Used By (0)

ernilambar/difftor
==================

[](#ernilambardifftor)

Diff helper - Compare two sources (URLs, directories, or zip files) and generate an HTML diff file.

Quick links: [Using](#using) | [Installing](#installing) | [Development](#development)

Using
-----

[](#using)

```
difftor   [--output-dir=DIR] [--porcelain]
```

Supports comparing:

- Two URLs pointing to zip files
- Two local directories
- Two local zip files
- Mixed combinations (e.g., URL and local directory)

The sources are extracted/prepared to temporary directories (if needed) and an HTML diff file is generated showing the differences. The HTML file is saved in the system temp directory (or specified output directory) and can be viewed in a browser.

**ARGUMENTS**

```

	Path to the old/original source. Can be:
	  - A URL pointing to a zip file
	  - A local directory path
	  - A local zip file path

	Path to the new/modified source. Can be:
	  - A URL pointing to a zip file
	  - A local directory path
	  - A local zip file path

```

**OPTIONS**

```
[--output-dir=DIR]
	Output directory for the HTML diff file. Defaults to system temp directory.

[--porcelain]
	Output only the file path, suitable for parsing.

```

**EXAMPLES**

```
# Compare two URLs (zip files)
$ difftor https://example.com/file1.zip https://example.com/file2.zip

# Compare two local directories
$ difftor /path/to/old-folder /path/to/new-folder

# Compare two local zip files
$ difftor /path/to/old.zip /path/to/new.zip

# Mixed: URL and local directory
$ difftor https://example.com/old.zip /path/to/new-folder

# Specify output directory
$ difftor /path/to/old /path/to/new --output-dir=/tmp/diffs

```

Installing
----------

[](#installing)

Install via Composer globally:

```
composer global require ernilambar/difftor
```

Then use the `difftor` command:

```
~/.composer/vendor/bin/difftor
```

Or add `~/.composer/vendor/bin` to your PATH.

Development
-----------

[](#development)

### Requirements

[](#requirements)

- PHP 8.3 or higher
- Composer

### Setup

[](#setup)

```
git clone https://github.com/ernilambar/difftor.git
cd difftor
composer install
```

### Running Tests

[](#running-tests)

```
# Run unit tests.
composer phpunit

# Run all tests.
composer test
```

Copyright and License
---------------------

[](#copyright-and-license)

This project is licensed under the [MIT](http://opensource.org/licenses/MIT).

2026 © [Nilambar Sharma](https://www.nilambar.net).

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance93

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity53

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

Total

3

Last Release

37d ago

Major Versions

1.0.1 → 2.0.02026-07-13

PHP version history (2 changes)1.0.0PHP &gt;=7.4

2.0.0PHP &gt;=8.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2098823?v=4)[Nilambar Sharma](/maintainers/ernilambar)[@ernilambar](https://github.com/ernilambar)

---

Top Contributors

[![ernilambar](https://avatars.githubusercontent.com/u/2098823?v=4)](https://github.com/ernilambar "ernilambar (47 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ernilambar-difftor/health.svg)

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

###  Alternatives

[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103574.3k70](/packages/friendsoftypo3-content-blocks)[phel-lang/phel-lang

Phel is a functional programming language that compiles to PHP

5196.5k22](/packages/phel-lang-phel-lang)

PHPackages © 2026

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