Path of the resulting file.
Indicates how many lines of context you want to include in diff result.
Set this parameter to
TRUE if you want to minimalize size of diff
(can take a long time). Resulting file is human-readable.
The following code makes unified diff of two php files.
$old_version = 'my_script.php';
$new_version = 'my_new_script.php';
xdiff_file_diff($old_version, $new_version, 'my_script.diff', 2);
This function doesn't work well with binary files. To make diff of binary files use xdiff_file_diff_binary().