3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo nl2br(htmlspecialchars(' foobar barfoo ', ENT_QUOTES, 'utf8'));
Output for 5.4.0 - 5.6.28, 7.0.0 - 7.1.0
Warning: htmlspecialchars(): charset `utf8' not supported, assuming utf-8 in /in/J9XvT on line 6 <br /> foobar<br /> barfoo<br />
Output for hhvm-3.10.0 - 3.12.0
Fatal error: utf8 is not implemented yet. in /in/J9XvT on line 6
Process exited with code 255.
Output for 4.3.2 - 5.3.29
Warning: htmlspecialchars(): charset `utf8' not supported, assuming iso-8859-1 in /in/J9XvT on line 6 <br /> foobar<br /> barfoo<br />
Output for 4.3.0 - 4.3.1
Warning: htmlspecialchars() [http://www.php.net/function.htmlspecialchars]: charset `utf8' not supported, assuming iso-8859-1 in /in/J9XvT on line 6
Process exited with code 139.