3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = "French for French is fran&ccedil;ais"; $str = html_entity_decode($str); $str = substr($str, 0, 27); echo htmlentities($str); //$str contains "French for French is fran├ža"; //example 2 $str = "the en dash looks like &#8211;"; $str = html_entity_decode($str); $str = substr($str, 0, 25); echo htmlentities($str);
Output for 5.4.0 - 7.2.0
French for French is fran&ccedil;
Output for 4.3.0 - 5.3.29
French for French is fran&ccedil;athe en dash looks like &amp;#