3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo bin2hex(htmlentities( "\xffhaha\x00", ENT_QUOTES | ENT_HTML401 | ENT_SUBSTITUTE, 'UTF-8', true ));
Output for 5.4.2 - 7.2.6
efbfbd6861686100
Output for 5.3.18 - 5.3.29
Notice: Use of undefined constant ENT_HTML401 - assumed 'ENT_HTML401' in /in/L9KCk on line 2 Notice: Use of undefined constant ENT_SUBSTITUTE - assumed 'ENT_SUBSTITUTE' in /in/L9KCk on line 2