3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function ConvertSimbols($var, $ConvertQuotes = 0) { if ($ConvertQuotes > 0) { $var = htmlentities($var, ENT_NOQUOTES, 'UTF-8'); $var = str_replace('\"', '', $var); $var = str_replace("\'", '', $var); } else { $var = htmlentities($var, ENT_QUOTES, 'UTF-8'); } return $var; } $message = ConvertSimbols("Balen\u00ed<\/span>Metry<\/span>"); echo $message;
Output for 4.3.2 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Balen\u00ed&lt;\/span&gt;Metry&lt;\/span&gt;
Output for 4.3.0 - 4.3.1

Process exited with code 139.