3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump(htmlentities('This + is. a < test', ENT_HTML5 ));
based on YZC47
Output for 5.4.0 - 7.1.0
string(34) "This &plus; is&period; a &lt; test"
Output for 4.3.0 - 5.3.29
Notice: Use of undefined constant ENT_HTML5 - assumed 'ENT_HTML5' in /in/MDUos on line 3 Warning: htmlentities() expects parameter 2 to be long, string given in /in/MDUos on line 3 NULL