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

Flesh-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

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: count syllables algorithm may vary from one system to another, which is why different scores can be obtained according to the used generator.