PHP Classes
elePHPant
Icontem

PHP Diff Two Strings: Compare two text strings and return the changes

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2014-02-03 (1 year ago) RSS 2.0 feedNot enough user ratingsTotal: 348 All time: 6,437 This week: 1,175Up
Version License PHP version Categories  
diff-util 1.0.0GNU Lesser Genera...5.0PHP 5, Text processing
Description Author  

This class can compare two text strings and return the changes.

It takes two strings and split them in their lines to determine which lines were added and removed.

The class can return an array that shows the changed lines or display the lines marked with + or - to denote the added or removed lines.

Picture of Jan Altensen
Name: Jan Altensen <contact>
Classes: 11 packages by
Country: Germany Germany
Age: 21
All time rank: 137589 in Germany Germany
Week rank: 16 Up1 in Germany Germany Up
Innovation award
Innovation award
Nominee: 3x

  Files folder image Files  
File Role Description
Plain text file DiffUtil.class.php Class main class
Plain text file example.php Example example

 Version Control Unique User Downloads Download Rankings  
 0%Total:348All time:6,437
 This week:0This week:1,175Up