public function versionDiff($current, $latest)
    {
        $needle = 0;

        while ($needle < strlen($current) && $needle < strlen($latest)) {
            if ($current[$needle] !== $latest[$needle]) {
                break;
            }

            $needle++;
        }

        return substr($latest, 0, $needle).'<green>'.substr($latest, $needle).'</green>';
    }
public function versionDiff($current, $latest)
    {
        $needle = 0;

        while ($needle < strlen($current) && $needle < strlen($latest)) {
            if ($current[$needle] !== $latest[$needle]) {
                break;
            }

            $needle++;
        }

        return substr($latest, 0, $needle).'<green>'.substr($latest, $needle).'</green>';
    }
public function versionDiff ( $ current , $ latest ) { $ needle = 0 ; while ( $ needle < strlen ( $ current ) && $ needle < strlen ( $ latest ) ) { if ( $ current [ $ needle ] !== $ latest [ $ needle ] ) { break ; } $ needle ++ ; } return substr ( $ latest , 0 , $ needle ) . '<green>' . substr ( $ latest , $ needle ) . '</green>' ; }
Get the diff between the current and latest version.

@param string $current
@param string $latest

@return string
Get the diff between the current and latest version .