3v4l.org

run code in 300+ PHP versions simultaneously
<?php setlocale(LC_ALL, "Turkish"); $str="i"; $res=strtoupper($str); var_dump([ "str"=>$str, "str_hex"=>bin2hex($str), "res"=>$res, "res_hex"=>bin2hex($res), ]);
Output for 7.4.26, 8.1.23 - 8.1.27, 8.2.10 - 8.2.17, 8.3.0 - 8.3.4
array(4) { ["str"]=> string(1) "i" ["str_hex"]=> string(2) "69" ["res"]=> string(1) "I" ["res_hex"]=> string(2) "49" }

preferences:
68.93 ms | 402 KiB | 24 Q