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

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

ahebrank/diff
=============

Diff implementation

011.6kPHP

Since Apr 1Pushed 7y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

sebastian/diff
==============

[](#sebastiandiff)

Diff implementation for PHP, factored out of PHPUnit into a stand-alone component.

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

[](#installation)

You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/):

```
composer require sebastian/diff

```

If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency:

```
composer require --dev sebastian/diff

```

### Usage

[](#usage)

#### Generating diff

[](#generating-diff)

The `Differ` class can be used to generate a textual representation of the difference between two strings:

```
