PHP Classes

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

Recommend this page to a friend!
     
  Info   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: 372 All time: 6,795 This week: 206Up
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
  Performance   Level  
Name: Jan Altensen <contact>
Classes: 12 packages by
Country: Germany Germany
Innovation award
Innovation award
Nominee: 5x

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

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:372
This week:0
All time:6,795
This week:206Up