3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ss = "\u{DF}"; var_dump(utf8_decode(addslashes("\xf0\xc0\xc0\xa7 or 1=1-- -"))); $tests = array( "\x41\xC2\x3E\x42", "\xE3\x80\x22", "\x41\x98\xBA\x42\xE2\x98\x43\xE2\x98\xBA\xE2\x98", ); foreach ($tests as $t) { var_dump(bin2hex(utf8_decode($t))); } echo "Done.\n";
Output for 8.2.0 - 8.2.19, 8.3.0 - 8.3.7
Deprecated: Function utf8_decode() is deprecated in /in/ciMRU on line 4 string(12) "? or 1=1-- -" Deprecated: Function utf8_decode() is deprecated in /in/ciMRU on line 12 string(8) "413f3e42" Deprecated: Function utf8_decode() is deprecated in /in/ciMRU on line 12 string(4) "3f22" Deprecated: Function utf8_decode() is deprecated in /in/ciMRU on line 12 string(16) "413f3f423f433f3f" Done.
Output for 5.2.15 - 5.2.17, 5.3.4 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28
string(12) "? or 1=1-- -" string(8) "413f3e42" string(4) "3f22" string(16) "413f3f423f433f3f" Done.
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.14, 5.3.0 - 5.3.3
string(12) "' or 1=1-- -" string(6) "41be42" string(2) "3f" string(14) "4198ba423f3f3f" Done.

preferences:
255.73 ms | 403 KiB | 458 Q