3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $var_1 = 'ah aha a'; $var_2 = 'WITH MYSQLWITH MYSQLWITH MYSQLWITH MYSQL'; similar_text($var_1, $var_2, $percent); echo $percent . '/n'; // 27.272727272727 similar_text($var_2, $var_1, $percent); echo $percent; // 18.181818181818
based on rfffX
Output for 5.6.0 - 7.2.6
8.3333333333333/n8.3333333333333