Login   Register  
PHP Classes
elePHPant
Icontem

Simple string diff: Compare two strings and return changed lines

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   Screenshots Screenshots   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2010-11-04 (4 years ago) RSS 2.0 feedNot yet rated by the usersTotal: 435 All time: 5,702 This week: 1,565Up
Version License PHP version Categories  
diff 1.0BSD License5.0PHP 5, Text processing
Description Author  

This class can be used to compare two strings and return the changed lines.

It takes two strings and split them into arrays of lines.

The class can compare the two arrays of lines and return a new text string denoting with + and - the lines that were added and removed from the first to the second string.

Picture of Artur Graniszewski
Name: Artur Graniszewski is available for providing paid consulting. Contact Artur Graniszewski .
Classes: 13 packages by
Country: Poland Poland
Age: 32
All time rank: 3295 in Poland Poland
Week rank: 180 Up4 in Poland Poland Up
Innovation award
Innovation award
Nominee: 7x

Winner: 1x

Screenshots  
  • diffSample.PNG
  Files folder image Files  
File Role Description
Plain text file diffClass.php Class Main class
Accessible without login Plain text file diffExample.php Example Example script

 Version Control Unique User Downloads Download Rankings  
 0%Total:435All time:5,702
 This week:0This week:1,565Up