206.835 - 1.015 x (count_words/count_sentences) - 84.6 x (count_syllabes/count_words)
5.89 x (count_characters/count_words) - 0.3 x (count_sentences/count_words) - 15.8
0.39 x (count_words/count_sentences) + 11.8 x (count_syllables/count_words) - 15.59
4.71 x (count_characters/count_words) + 0.5 x (count_words/count_sentences) - 21.43
0.4 x [(count_words/count_sentences) + 100 x (count_complex_words/count_words)]
Complex words contain 3 or more syllables.
For strings of less than 255 characters (or equal to 255 characters), this score can be obtained via the native function "levenshtein" php:
$levenshtein = levenshtein("$string1","$string2");
Longer strings require the implementation of the distance algorithm.