How can I highlight the difference between two strings in PHP?
I'm thinking along the lines of the Stack Overflow edit history page, where new text is in green and removed text is in red. If there are any native functions or classes available, that would be ideal.
You can use the PHP Inline-Diff package. It uses Text_Diff underneath. It suits your needs, and is quite customisable as well.
It's also licensed under the GPL.