PHPackages                             stolt/difftastic-php - 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. stolt/difftastic-php

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

stolt/difftastic-php
====================

PHP wrapper around the difftastic CLI.

v0.0.1(1y ago)32MITPHPPHP &gt;=8.1CI passing

Since Jan 24Pushed 1y ago1 watchersCompare

[ Source](https://github.com/raphaelstolt/difftastic-php)[ Packagist](https://packagist.org/packages/stolt/difftastic-php)[ RSS](/packages/stolt-difftastic-php/feed)WikiDiscussions main Synced 1mo ago

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

Difftastic PHP
==============

[](#difftastic-php)

[![Test Status](https://github.com/raphaelstolt/difftastic-php/workflows/test/badge.svg)](https://github.com/raphaelstolt/difftastic-php/workflows/test/badge.svg)[![Version](https://camo.githubusercontent.com/7e78460474b7aba451a942ccf8098b22cd84d316e5cc535bbe70594f911d57c5/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73746f6c742f646966667461737469632d7068702e7376673f7374796c653d666c6174)](https://packagist.org/packages/stolt/difftastic-php)[![PHP Version](https://camo.githubusercontent.com/770d43133153ead0a9b8526e3352ca9933aa60cadcac54fd28aca42c3f71a613/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e312b2d6666363962342e737667)](https://camo.githubusercontent.com/770d43133153ead0a9b8526e3352ca9933aa60cadcac54fd28aca42c3f71a613/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e312b2d6666363962342e737667)[![PDS Skeleton](https://camo.githubusercontent.com/3c7140ee36205075ed977142f25c29eb1fb7809e9b86a865461fc21776ad1665/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7064732d736b656c65746f6e2d626c75652e7376673f7374796c653d666c6174)](https://github.com/php-pds/skeleton)

This Composer package provides a wrapper around [difftastic](https://github.com/Wilfred/difftastic)for usage in PHP based projects; therefor it requires `difftastic` to be [installed](https://difftastic.wilfred.me.uk/installation.html). Which can be done on macOS via a simple `brew install difftastic`.

Installation
------------

[](#installation)

The difftastic wrapper for PHP can be installed through Composer.

```
composer require stolt/difftastic-php
```

Usage
-----

[](#usage)

```
use Stolt\Difftastic;

$difftastic = new Difftastic();
$diff = $difftastic->diff('[1, 2, 3]', '[3, 2, 1]');
```

With options differing from the default:

```
use Stolt\Difftastic;

$difftastic = new Difftastic(background: 'light', color: 'never');
$diff = $difftastic->diff('[1, 2, 3]', '[3, 2, 1]');
```

### Running tests

[](#running-tests)

```
composer test
```

### License

[](#license)

This PHP package is licensed under the MIT license. Please see [LICENSE.md](LICENSE.md) for more details.

### Changelog

[](#changelog)

Please see [CHANGELOG.md](CHANGELOG.md) for more details.

### Contributing

[](#contributing)

Please see [CONTRIBUTING.md](.github/CONTRIBUTING.md) for more details.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance42

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community7

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

Unknown

Total

1

Last Release

479d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/132faf5713fa951f4263fad02858a62e55c5d832ad775b33e49ba0cda2f2a028?d=identicon)[Raphael Stolt](/maintainers/Raphael%20Stolt)

---

Top Contributors

[![raphaelstolt](https://avatars.githubusercontent.com/u/48225?v=4)](https://github.com/raphaelstolt "raphaelstolt (2 commits)")

---

Tags

devwrapperdifftastic

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/stolt-difftastic-php/health.svg)

```
[![Health](https://phpackages.com/badges/stolt-difftastic-php/health.svg)](https://phpackages.com/packages/stolt-difftastic-php)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[symfony/maker-bundle

Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code.

3.4k111.1M568](/packages/symfony-maker-bundle)[simplesoftwareio/simple-qrcode

Simple QrCode is a QR code generator made for Laravel.

2.9k27.6M92](/packages/simplesoftwareio-simple-qrcode)[symfony/polyfill

Symfony polyfills backporting features to lower PHP versions

2.8k4.5M24](/packages/symfony-polyfill)[phing/phing

PHing Is Not GNU make; it's a PHP project build system or build tool based on Apache Ant.

1.2k21.7M876](/packages/phing-phing)[phpstan/extension-installer

Composer plugin for automatic installation of PHPStan extensions

50398.1M8.3k](/packages/phpstan-extension-installer)

PHPackages © 2026

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