v2.0.4 2016-09-20 18:34 UTC


Build Status

About this repo

This is a fork of Chris Boulton's Diff project.


Phalcon Diff is a comprehensive library for generating differences between two hashable objects (strings or arrays). Generated differences can be rendered in all of the standard formats including:

  • Unified
  • Context
  • Inline HTML
  • Side by Side HTML

The logic behind the core of the diff engine (ie, the sequence matcher) is primarily based on the Python difflib package. The reason for doing so is primarily because of its high degree of accuracy.

Please write us if you have any feedback.

Get Started


To run this library on your project, you need at least:

  • PHP >= 5.4
  • PHP mbstring extension


Install Composer in a common location or in your project:

$ curl -s | php

Create the composer.json file as follows:

    "require": {
        "phalcongelist/php-diff": "~2.0"

Run the composer installer:

$ php composer.phar install

Example Use

More complete documentation will be available shortly.


  • Ability to ignore blank line changes
  • 3 way diff support
  • Performance optimizations


Phalcon Diff is open-sourced software licensed under the New BSD License.

© 2016, Phalcon Framework Team and contributors
© 2009-2016, Chris Boulton
All rights reserved.