3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $string = ''; foreach(str_split(iconv("UTF-8", "Windows-1252", "my utf8 string áéíóú")) as $n => $c) { if (! is_alnum($c)) { $c = '%'.bin2hex($c); } $string .= $c; } var_dump($string);
based on ejBi4
Output for 7.0.0 - 7.0.5, 7.0.20 - 7.2.0
Fatal error: Uncaught Error: Call to undefined function is_alnum() in /in/ZTBSt:5 Stack trace: #0 {main} thrown in /in/ZTBSt on line 5
Process exited with code 255.
Output for 7.0.6
Fatal error: Uncaught Error: Call to undefined function iconv() in /in/ZTBSt:4 Stack trace: #0 {main} thrown in /in/ZTBSt on line 4
Process exited with code 255.
Output for 5.3.18 - 5.5.34, 5.6.7 - 5.6.20, 5.6.28
Fatal error: Call to undefined function is_alnum() in /in/ZTBSt on line 5
Process exited with code 255.
Output for 5.5.35, 5.6.21
Fatal error: Call to undefined function iconv() in /in/ZTBSt on line 4
Process exited with code 255.