ssdeep PHP/PECL Extension
This PHP extension exposes the ssdeep API to PHP providing functions for hashing strings and files. It also allows you to compare hashes against one another and return a match score (0 to 100).
Fuzzy hashing makes it easy to identify similar or almost identical text by simply comparing two hashes against each other.
ssdeep is a program for computing context triggered piecewise hashes (CTPH). Also called fuzzy hashes, CTPH can match inputs that have homologies. Such inputs have sequences of identical bytes in the same order, although bytes in between these sequences may be different in both content and length.
-- Jesse Kornblum/ssdeep project
For an in depth paper explaining context triggered piecewise hashes please see http://dfrws.org/2006/proceedings/12-Kornblum.pdf