3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $u = '%e5%ad%99%e6%82%9f%e7%a9%ba'; $o1 = urldecode($u); echo $o1.PHP_EOL; $o2 = iconv('gb2312',"UTF-8//IGNORE",$o1); echo $o2; var_dump( mb_detect_encoding($o1, 'UTF-8') );
Output for 5.4.0 - 5.5.34, 5.6.8 - 5.6.20, 5.6.28 - 7.0.5, 7.0.20 - 7.2.0
孙悟空 Notice: iconv(): Detected an incomplete multibyte character in input string in /in/4fg2B on line 7 string(5) "UTF-8"
Output for 7.0.6
孙悟空 Fatal error: Uncaught Error: Call to undefined function iconv() in /in/4fg2B:7 Stack trace: #0 {main} thrown in /in/4fg2B on line 7
Process exited with code 255.
Output for 5.5.35, 5.6.21
孙悟空 Fatal error: Call to undefined function iconv() in /in/4fg2B on line 7
Process exited with code 255.
Output for 5.3.19 - 5.3.29
孙悟空 Notice: iconv(): Detected an incomplete multibyte character in input string in /in/4fg2B on line 7 瀛绌string(5) "UTF-8"