3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(PHP_INT_MAX); ini_set("mbstring.substitute_character", (string) ord("X")); ini_set("mbstring.strict_detection", "1"); // no effect // bytes 0x80-0xff are not valid ASCII: echo 1, rawurlencode(mb_convert_encoding("\x80", "UTF-8", "ASCII")) . "\n"; // bytes 0x80-0x9f are not valid ISO-8859-1: echo 2, rawurlencode(mb_convert_encoding("\x80", "UTF-8", "ISO-8859-1")) . "\n"; echo 3, rawurlencode(mb_convert_encoding("\x80", "UTF-8", "UTF-8")) . "\n";

preferences:
49.71 ms | 402 KiB | 5 Q