Code
Result

PHP code example: xdiff_string_diff

Make unified diff of two strings. See documentation.

You can try this function yourself. Just edit the code and on "Run" to see the result.