src/DiffMatchPatch.php
public function diff_main($text1, $text2, $checklines = true)
    {
        return $this->diff->main($text1, $text2, $checklines)->getChanges();
    }
public function diff_main($text1, $text2, $checklines = true)
    {
        return $this->diff->main($text1, $text2, $checklines)->getChanges();
    }
Find the differences between two texts.  Simplifies the problem by
stripping any common prefix or suffix off the texts before diffing.

@param string $text1      Old string to be diffed.
@param string $text2      New string to be diffed.
@param bool   $checklines Optional speedup flag.  If present and false, then don't run
a line-level diff first to identify the changed areas.
Defaults to true, which does a faster, slightly less optimal diff.

@throws \InvalidArgumentException If texts is null.
@return array Array of changes.