3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'áéóú'; // ISO-8859-1 echo mb_detect_encoding($str, 'UTF-8'); // 'UTF-8' echo mb_detect_encoding($str, 'UTF-8', true); // false ?>

preferences:
45.65 ms | 402 KiB | 5 Q