Метод |
Описание |
|
compare ( $string1, $string2, $compareCharacters = false, $ignoreIndent = true ) |
* Returns the diff for two strings. The return value is an array, each of
whose values is an array containing two values: a line (or character, if
$compareCharacters is true), and one of the constants DIFF::UNMODIFIED (the
line or character is in both strings), DIFF::DELETED (the line or character
is only in the first string), and DIFF::INSERTED (the line or character is
only in the second string). The parameters are: |
|
compareFiles ( $file1, $file2, $compareCharacters = false ) |
* Returns the diff for two files. The parameters are: |
|
toHTML ( $diff, $separator = '<br>' ) |
* Returns a diff as an HTML string, where unmodified lines are contained
within 'span' elements, deletions are contained within 'del' elements, and
insertions are contained within 'ins' elements. The parameters are: |
|
toString ( $diff, $separator = "
" ) |
* Returns a diff as a string, where unmodified lines are prefixed by ' ',
deletions are prefixed by '- ', and insertions are prefixed by '+ '. The
parameters are: |
|
toTable ( $diff, $indentation = '', $separator = '<br>' ) |
* Returns a diff as an HTML table. The parameters are: |
|