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.5.17, 5.6.0 - 5.6.38, hhvm-3.10.1 - 3.21.3, 7.0.0 - 7.3.1
孙悟空 Notice: iconv(): Detected an incomplete multibyte character in input string in /in/4fg2B on line 7 string(5) "UTF-8"
Output for hhvm-3.22.0
孙悟空 Notice: iconv(): Detected an incomplete multibyte character in input string in /in/4fg2B on line -1 string(5) "UTF-8"
Output for 5.4.0 - 5.5.16, 5.5.18 - 5.5.38
孙悟空 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"