• PHP Video Tutorials

PHP - xdiff file_bdiff() Function



xdiff_file_bdiff() function can make a binary diff of two files.

Syntax

bool xdiff_file_bdiff( string $old_file , string $new_file , string $dest )

xdiff_file_bdiff() function can make a binary diff of two files and store the result in a patch file. This function can work with both text and binary files and the resulting patch file can be later applied by using xdiff_file_bpatch()/xdiff_string_bpatch().

xdiff_file_bdiff() function can return true on success or false on failure.

Example

<?php
   $old_version = "my_script_1.0.tgz";
   $new_version = "my_script_1.1.tgz";

   xdiff_file_bdiff($old_version, $new_version, "my_script.bdiff");
?>
php_function_reference.htm
Advertisements