3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $cp1252str = ''; for ($i = 128; $i < 256; $i++) { $cp1252str .= chr($i); } print "Work iconv:\n"; iconv("cp1252", "utf-8//IGNORE", $cp1252str); print "Work iconv_strlen:\n"; iconv_strlen($cp1252str, "utf-8//IGNORE");
Output for 5.3.21 - 5.5.34, 5.6.8 - 5.6.20, 5.6.28 - 7.0.5, 7.0.20 - 7.2.0
Work iconv: Work iconv_strlen: Notice: iconv_strlen(): Detected an illegal character in input string in /in/rvFmg on line 11
Output for 7.0.6
Work iconv: Fatal error: Uncaught Error: Call to undefined function iconv() in /in/rvFmg:9 Stack trace: #0 {main} thrown in /in/rvFmg on line 9
Process exited with code 255.
Output for 5.5.35, 5.6.21
Work iconv: Fatal error: Call to undefined function iconv() in /in/rvFmg on line 9
Process exited with code 255.