Location: PHPKode > scripts > Synchronization Analysis > synchronization-analysis/synchanalysis.example.php
<?php
require_once ('synchanalysis.class.php');

$text1 = 
"Line0

Line1
Line2
Line3
Line4";
$text2 = 
"Line0
Line1
Line3

Line2";
$source = array ('text1'=>$text1, 'text2'=>$text2);

	$SC = new SynchAnalysis ();
	xmp ($source, 'Source');
	$diff = $SC->synch ($source);
	xmp ($diff, 'Result');
function xmp (&$a, $label = null)
{
	$nl = "\r\n";
	if ($label) print "{$nl}<hr /><b>{$label}:</b>{$nl}";
	print "{$nl}<xmp>{$nl}";
	print_r ($a);
	print "{$nl}</xmp>{$nl}";
}
?>
Return current item: Synchronization Analysis