3v4l.org

run code in 300+ PHP versions simultaneously
<?php $setting_result = mb_substitute_character('long'); $decodedText = 'a'.chr(0x81).'b'; print(mb_convert_encoding($decodedText, 'UTF-8', 'ASCII'));
Output for 8.1.32, 8.2.0 - 8.2.29, 8.3.0 - 8.3.25, 8.4.1 - 8.4.13
a?b
Output for 8.0.30
ab

preferences:
47.14 ms | 406 KiB | 5 Q