3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump( $conv = mb_convert_encoding( $bin = hex2bin("7e0a"), "HZ", "ASCII" ), mb_check_encoding($bin, "ASCII"), bin2hex(mb_convert_encoding($conv, "ASCII", "HZ")) );
Output for 7.4.0 - 7.4.33, 8.0.1 - 8.0.26, 8.2.0 - 8.2.2
string(3) "~~ " bool(true) string(4) "7e0a"
Output for 8.1.0 - 8.1.15
string(3) "~~ " bool(true) string(2) "7e"

preferences:
40.86 ms | 406 KiB | 5 Q