3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = "Hello"; $b = "world"; $matching = array_unique(array_intersect(str_split(strtolower($a)), str_split(strtolower($b)))); $t = microtime(true); if($matching) echo "\nmatching characters: " . implode(", ", $matching); echo "\n" . (microtime(true)-$t)*100; $s = microtime(true); if(count($matching)>0) echo "\nmatching characters: " . implode(", ", $matching); echo "\n" . (microtime(true)-$s)*100;

preferences:
27.95 ms | 409 KiB | 5 Q