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.

1.0.1(4mo ago)010MITPHPPHP &gt;=7.4CI passing

Since Dec 1Pushed 4mo 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 1mo ago

READMEChangelogDependencies (7)Versions (3)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 7.4 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).

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

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance73

Regular maintenance activity

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

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

Total

2

Last Release

149d ago

### 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 (41 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

[coenjacobs/mozart

Composes all dependencies as a package inside a WordPress plugin

4723.6M20](/packages/coenjacobs-mozart)[php-soap/wsdl

Deals with WSDLs

173.5M12](/packages/php-soap-wsdl)[phel-lang/phel-lang

Phel is a functional programming language that compiles to PHP

4743.5k10](/packages/phel-lang-phel-lang)[symfony/ai-bundle

Integration bundle for Symfony AI components

30282.3k6](/packages/symfony-ai-bundle)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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