Page 1 of 1

diff implementation

Posted: Tue Jun 12, 2007 12:35 am
by alex.barylski
I'm looking for the cleanest 'diff' implementation you have ever seen, preferably in PHP.

I need something well tested and easy to port if not in PHP.

I have searced Google, I am familiar with lcs. I am looking specifically for something you have used in the past perhaps or have heard good things about?

Cheers :)

Posted: Tue Jun 12, 2007 2:40 am
by Maugrim_The_Reaper
PHP has a diff extension in PECL using libxdiff.
http://ie2.php.net/xdiff

Besides that the only one I know is maintained in the Horde Framework. Check the Horde Framework Text module and you can grab a copy. Far as I recall it uses xdiff if available to speed things up. I also think it's pretty much identical to PEAR's Text_Diff.

Posted: Tue Jun 12, 2007 2:49 am
by John Cartwright
There is also the pure php implementation found here

Posted: Tue Jun 12, 2007 1:29 pm
by Weirdan

Code: Select all

system('diff -u'); //