3v4l.org

run code in 300+ PHP versions simultaneously
<?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);
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: mb_ereg_replace(): Passing null to parameter #3 ($string) of type string is deprecated in /in/5oZMS on line 6 �&lt;script+%C2&gt;alert(1);//%C2&lt;/script+%C2&gt;

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
63.91 ms | 401 KiB | 8 Q