Skip to content

Simple class wrapper for generating array and HTML diffs in PHP

License

Notifications You must be signed in to change notification settings

CodeDruids/simple-diff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimpleDiff

Latest release Build Status Code Coverage Code Quality Software License

SimpleDiff is a PHP class wrapper for a simple diffing algorithm.

Requirements

  • PHP 5.4 or higher

Installation

Add the following to your composer.json:

{
    "require": {
        "CodeDruids/simple-diff": "1.*"
    }
}

Basic Usage

$old = ['some','array','of','stuff'];
$new = ['some','array','of','other','stuff'];

$diff = \CodeDruids\SimpleDiff::diff($old, $new);

$oldHtml = "Some <b>HTML</b> you simply <i>cannot</i> ignore!";
$newHtml = "Some <b>HTML</b> you just <i>cannot</i> ignore!";

$htmlDiff = \CodeDruids\SimpleDiff::htmlDiff($oldHtml, $newHmtl);

Support

If you believe you have found a bug, please report it using the GitHub issue tracker, or better yet, fork the library and submit a pull request.

About

Simple class wrapper for generating array and HTML diffs in PHP

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages