1 diff.inc | Diff::reverse() |
Compute reversed Diff.
SYNOPSIS:
$diff = new Diff($lines1, $lines2); $rev = $diff->reverse();
Return value
Object A Diff object representing the inverse of the: original diff.
File
- core/
includes/ diff.inc, line 660 - A PHP diff engine for phpwiki. (Taken from phpwiki-1.3.3)
Class
- Diff
- Class representing a 'diff' between two sequences of strings.
Code
function reverse() {
$rev = $this;
$rev->edits = array();
/** @var DiffOp $edit */
foreach ($this->edits as $edit) {
$rev->edits[] = $edit->reverse();
}
return $rev;
}