PHP code example of mrkovec / sdiff
1. Go to this page and download the library: Download mrkovec/sdiff library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mrkovec / sdiff example snippets
$a = "marry had lambs";
$b = "mary had a little lamb";
$result = SDiff::getCharDiff($a, $b);
$result = SDiff::getWordDiff($a, $b);
$a = [
'marry' => 'had lambs'
];
$b = [
'mary' => 'had a little lamb'
];
$result = SDiff::getObjectDiff($a, $b);