diff()
diff(string $diff, string $mode = 'autodetect') : array
Parses a unified or context diff.
First param contains the whole diff and the second can be used to force a specific diff type. If the second parameter is 'autodetect', the diff will be examined to find out which type of diff this is.
Parameters
string | $diff | The diff content. |
string | $mode | The diff mode of the content in $diff. One of 'context', 'unified', or 'autodetect'. |
Throws
- \Horde_Text_Diff_Exception
Returns
array —List of all diff operations.