3v4l.org

run code in 300+ PHP versions simultaneously
<?php setlocale(LC_ALL, "tr_TR"); $str="i"; $res=strtoupper($str); var_dump([ "str"=>$str, "str_hex"=>bin2hex($str), "res"=>$res, "res_hex"=>bin2hex($res), ]);
Output for 8.2.10 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6 - 8.3.7
array(4) { ["str"]=> string(1) "i" ["str_hex"]=> string(2) "69" ["res"]=> string(1) "I" ["res_hex"]=> string(2) "49" }
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 array(4) { ["str"]=> string(1) "i" ["str_hex"]=> string(2) "69" ["res"]=> string(1) "I" ["res_hex"]=> string(2) "49" }
Output for 7.4.26, 8.1.23 - 8.1.28
array(4) { ["str"]=> string(1) "i" ["str_hex"]=> string(2) "69" ["res"]=> string(1) "�" ["res_hex"]=> string(2) "dd" }

preferences:
78.41 ms | 402 KiB | 29 Q