codedruids / simple-diff
PHP class wrapper for simple diff operation.
v1.0.3
2018-01-31 03:50 UTC
Requires
- php: >=5.4.0
Requires (Dev)
- phpunit/phpunit: 4.2.*
- squizlabs/php_codesniffer: 3.*
This package is auto-updated.
Last update: 2024-10-26 18:06:36 UTC
README
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.