3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo mb_detect_encoding('abc', ['UTF8', 'ASCII']);
Output for 8.1.30 - 8.1.33, 8.2.22 - 8.2.29, 8.3.5 - 8.3.25, 8.4.1 - 8.4.12
UTF-8

preferences:
38.5 ms | 406 KiB | 5 Q