diff implementation

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

diff implementation

Post 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 :)
User avatar
Maugrim_The_Reaper
DevNet Master
Posts: 2704
Joined: Tue Nov 02, 2004 5:43 am
Location: Ireland

Post 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.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

There is also the pure php implementation found here
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

Code: Select all

system('diff -u'); //
Post Reply