PHP Function XDiff_String_Diff
Top rated real world PHP examples of xdiff_string_diff
Strings in PHP are often broken into smaller components called tokens. Several functions exist to help with this work including: strlen( ) which returns the length of a string; explode( ) which splits a string into its tokens; and strrev( ) which reverses the order of the string's letters. Other useful functions include strtoupper() and strtolower() which change the case of a string, and str_split( ) which returns an array containing parts of a string.
Another useful function for working with strings is xdiff_string_diff(), which makes a unified diff between two strings. The optional context parameter indicates how many lines of context you want to include in the diff result. Set minimal to TRUE if you want to minimize size of diff (can take a long time). Returns string with result or FALSE if an internal error happened.