3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $var_1 = 'PHP IS GREAT'; $var_2 = 'WITH MYSQL'; similar_text($var_1, $var_2, $percent); echo $percent; // 27.272727272727 similar_text($var_2, $var_1, $percent); echo $percent; // 18.181818181818
Output for 4.3.0 - 5.0.5, 5.1.1 - 5.6.28, 7.0.0 - 7.1.0
27.27272727272718.181818181818
Output for hhvm-3.10.0 - 3.12.0
27.27272796630918.181818008423
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/GZb6o on line 13
Process exited with code 255.