3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo "start\n"; $x = htmlentities('a', ENT_COMPAT | ENT_HTML401,'US-ASCII'); echo "end\n";
based on b7Lf1
Output for 5.4.0 - 7.2.0
start Warning: htmlentities(): charset `US-ASCII' not supported, assuming utf-8 in /in/lrW1O on line 4 end
Output for 4.3.2 - 5.3.29
start Notice: Use of undefined constant ENT_HTML401 - assumed 'ENT_HTML401' in /in/lrW1O on line 4 Warning: htmlentities(): charset `US-ASCII' not supported, assuming iso-8859-1 in /in/lrW1O on line 4 end
Output for 4.3.0 - 4.3.1
start Notice: Use of undefined constant ENT_HTML401 - assumed 'ENT_HTML401' in /in/lrW1O on line 4 Warning: htmlentities() [http://www.php.net/function.htmlentities]: charset `US-ASCII' not supported, assuming iso-8859-1 in /in/lrW1O on line 4
Process exited with code 139.