I am trying to compare two strings, and I want to know if something from string 1 is deleted or replaced in string 开发者_开发技巧2.
I tried using the following: http://pear.php.net/manual/en/package.text.text-diff.intro.php http://www.raymondhill.net/finediff/viewdiff-ex.php
But I can't get it to work.
Is http://pear.php.net/manual/en/package.text.text-diff.usage-examples.shell.php not enough?
If you installed the Text_Diff package, you will also have an example installed automatically:
$ pear list-files text_diff|grep doc
doc /usr/share/php/docs/Text_Diff/docs/examples/1.txt
doc /usr/share/php/docs/Text_Diff/docs/examples/2.txt
doc /usr/share/php/docs/Text_Diff/docs/examples/diff.php
精彩评论