3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo $str = "Coss&eacute; René"; echo "\n"; echo $str = htmlentities($str,ENT_XML1,UTF-8); echo "\n"; echo $str = html_entity_decode($str); echo "\n";
based on ThOZj
Output for 7.2.0
Coss&eacute; René Warning: Use of undefined constant UTF - assumed 'UTF' (this will throw an Error in a future version of PHP) in /in/D4Cv6 on line 4 Warning: A non-numeric value encountered in /in/D4Cv6 on line 4 Warning: htmlentities(): charset `-8' not supported, assuming utf-8 in /in/D4Cv6 on line 4 Coss&amp;eacute; René Coss&eacute; René
Output for 7.1.0 - 7.1.10
Coss&eacute; René Notice: Use of undefined constant UTF - assumed 'UTF' in /in/D4Cv6 on line 4 Warning: A non-numeric value encountered in /in/D4Cv6 on line 4 Warning: htmlentities(): charset `-8' not supported, assuming utf-8 in /in/D4Cv6 on line 4 Coss&amp;eacute; René Coss&eacute; René
Output for 5.4.2 - 7.0.20
Coss&eacute; René Notice: Use of undefined constant UTF - assumed 'UTF' in /in/D4Cv6 on line 4 Warning: htmlentities(): charset `-8' not supported, assuming utf-8 in /in/D4Cv6 on line 4 Coss&amp;eacute; René Coss&eacute; René
Output for 5.3.18 - 5.3.29
Coss&eacute; René Notice: Use of undefined constant ENT_XML1 - assumed 'ENT_XML1' in /in/D4Cv6 on line 4 Notice: Use of undefined constant UTF - assumed 'UTF' in /in/D4Cv6 on line 4 Warning: htmlentities() expects parameter 2 to be long, string given in /in/D4Cv6 on line 4