src/DiffMatchPatch.php
public function match_main($text, $pattern, $loc = 0)
    {
        return $this->match->main($text, $pattern, $loc);
    }
public function match_main($text, $pattern, $loc = 0)
    {
        return $this->match->main($text, $pattern, $loc);
    }
Locate the best instance of 'pattern' in 'text' near 'loc'.

@param string $text    The text to search.
@param string $pattern The pattern to search for.
@param int    $loc     The location to search around.

@throws \InvalidArgumentException If null inout.
@return int Best match index or -1.