What is the best PHP class to compare strings?: Compare strings

Recommend this page to a friend!
  All requests RSS feed  >  What is the best PHP class to compare...  >  Request new recommendation  >  A request is featured when there is no good recommended package on the site when it is posted. Featured requests  >  No recommendations No recommendations  

What is the best PHP class to compare strings?

Edit

by Calmette - 5 years ago (2015-02-27)

Compare strings

This request is clear and relevant.
This request is not clear or is not relevant.

+5

I want to compare strings and get the differences between them.

Ask clarification

2 Recommendations

PHP Diff Text Strings: Find differences between texts and patch strings

This recommendation solves the problem.
This recommendation does not solve the problem.

+1

by Till Wehowski package author package author Reputation 110 - 5 years ago (2015-03-05) Comment

This class has similar functionality. It does not render the differences for you, but provides an optimized compressed version (to save space) of the differences and also can patch back to the original string from the optimized differences. However, if you need the class to render the differences you should prefer the above class of Manuel Lemos.


PHP Text Diff Highlight class: Find and view the difference between text strings

This recommendation solves the problem.
This recommendation does not solve the problem.

+3

by Manuel Lemos package author package author Reputation 18490 - 5 years ago (2015-03-04) Comment

This class can compare two strings and return the list of changes to turn one string into the other, like lines or characters to add or removed.

It can also present the string changes in HTML so you can view them in a Web page. 


Recommend package
: 
: 
For more information send a message to info at phpclasses dot org.