Is there any way (using libraries if necesary) to normalize any PHP variable (integer, strings, files, bytarray, etc etc), so this data can be measure by distance among them?
With distance I mean, a F("hello") should be close to a F("hell").
However, not only for string, but AMONG nay kind of data.
I thought of passing first everything to binary, but PHP bits managament is not so straight forward. In C++, this can be done much easier.
For example I should be able to calculate distance among f("hello") and f(3333). (differente data types).
Maybe dumping everything to a bytearray?
Thanks
The Levenshtein function might be something to look into.
From the php.net page:
The above example will output: