Make binary diff of two strings using the Rabin's polynomial fingerprinting algorithm

- « xdiff_string_patch_binary

- Human Language and Character Encoding Support »

- PHP Manual
- xdiff Functions
- Make binary diff of two strings using the Rabin's polynomial fingerprinting algorithm

# xdiff_string_rabdiff

(PECL xdiff >= 1.5.0)

xdiff_string_rabdiff — Make binary diff of two strings using the Rabin's polynomial fingerprinting algorithm

### Description

xdiff_string_bdiff(string `$old_data`, string `$new_data`): string

Makes a binary diff of two strings and returns the result. The difference between this function and xdiff_string_bdiff() is different algorithm used which should result in faster execution and smaller diff produced. This function works with both text and binary data. Resulting patch can be later applied using xdiff_string_bpatch()/xdiff_file_bpatch().

For more details about differences between algorithm used please check » libxdiff website.

### Parameters

`old_data`

  First string with binary data. It acts as "old" data.

`new_data`

  Second string with binary data. It acts as "new" data.

### Return Values

Returns string with binary diff containing differences between "old" and "new" data or `false` if an internal error occurred.

### See Also

- xdiff_string_bpatch() - Patch a string with a binary diff