3v4l.org

run code in 200+ PHP versions simultaneously
<?php $stringA = 'INTËRÑÂTÎÔNÆLÍZÀTIØN'; $stringB = 'Intërñâtîônælízàtiøn'; echo 'strcasecmp():',PHP_EOL; var_dump(strcasecmp($stringA, $stringB) === 0); echo PHP_EOL,'strnatcasecmp():',PHP_EOL; var_dump(strnatcasecmp($stringA, $stringB) === 0); echo PHP_EOL,'str_ireplace():',PHP_EOL; var_dump(str_ireplace($stringA, '', $stringB, $count) === '' && $count === 1); echo PHP_EOL,'preg_match():',PHP_EOL; var_dump(preg_match('`^' . preg_quote($stringA, '`') . '$`i', $stringB) === 1);
based on u8T2L