This is a PHP mini library to work with differences in two arrays. It's way of doing things is inspired by the way Git works, only simplified.
Using the diff library isn't hard. You create a new instance of the class and you pass along your data arrays in the constructor and call one of the utility methods:
<?php
$diff = new Sfranken\Diff($a, $b);
print '<pre>' . print_r($diff->toArray(), true) . '</pre>';
?>
See the index.php file for a more in depth example of how to use this class
The toArray
function shows the result as an array which you can work with later on.
The class has the following methods: