3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str1 = "the cat is on the roof"; $str2 = "the mouse is on the roof"; $chars = similar_text($str1, $str2, $percent); echo $chars . "\n"; echo $percent;

preferences:
34.86 ms | 402 KiB | 5 Q