3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x = "\xC2<script+%C2>alert(1);//%C2</script+%C2>"; function mb_htmlescape($s) { mb_regex_encoding('UTF-8'); $s = mb_ereg_replace('&', '&amp;', $s); $s = mb_ereg_replace('<', '&lt;', $s); $s = mb_ereg_replace('>', '&gt;', $s); $s = mb_ereg_replace('"', '&quot;', $s); return $s; } echo mb_htmlescape($x); echo htmlspecialchars($x);
based on egDfr
Output for 7.1.0 - 7.3.0beta1
Output for 5.5.0 - 7.0.20
�<script+%C2&gt;alert(1);//%C2&lt;/script+%C2&gt;