PHP Classes

Simple string diff: Compare two strings and return changed lines

Recommend this page to a friend!
  Info   Screenshots   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 452 All time: 6,167 This week: 673Up
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
  Performance   Level  
Name: Artur Graniszewski <contact>
Classes: 14 packages by
Country: Poland Poland
Innovation award
Innovation award
Nominee: 7x

Winner: 1x

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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:452
This week:0
All time:6,167
This week:673Up