Flesch-Kincaid Reading Ease

206.835 - 1.015 x (count_words/count_sentences) - 84.6 x (count_syllabes/count_words)

Coleman Liau Index

5.89 x (count_characters/count_words) - 0.3 x (count_sentences/count_words) - 15.8

Flesch-Kincaid Grade Level

0.39 x (count_words/count_sentences) + 11.8 x (count_syllables/count_words) - 15.59

Automated Readability Index (ARI)

4.71 x (count_characters/count_words) + 0.5 x (count_words/count_sentences) - 21.43

Gunning Fog Index

0.4 x [(count_words/count_sentences) + 100 x (count_complex_words/count_words)]
Complex words contain 3 or more syllables.

Levenshtein Distance

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.

NB: The syllable counting algorithm may vary from system to system, therefore different scores may be obtained depending on the generator used.