3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo htmlentities(" abc<>^&etc'\"wee<>") . "\n"; echo htmlspecialchars(" abc<>^&etc'\"wee<>", 'UTF-8', false);
Output for 7.0.0 - 7.2.0
abc&lt;&gt;^&amp;etc'&quot;wee&lt;&gt; Warning: htmlspecialchars() expects parameter 2 to be integer, string given in /in/PVfGT on line 4
Output for 4.3.0 - 5.6.28
abc&lt;&gt;^&amp;etc'&quot;wee&lt;&gt; Warning: htmlspecialchars() expects parameter 2 to be long, string given in /in/PVfGT on line 4