3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * @link https://stackoverflow.com/a/10042586/367456 * @param string $string unicode and ulrencoded string * @return string decoded string */ function utf8_urldecode($string) { $string = preg_replace( "/%u([0-9a-f]{3,4})/i", "&#x\\1;", urldecode($string) ); return html_entity_decode($string, ENT_XML1, 'UTF-8'); } $decoded = utf8_urldecode('%u20AC'); class_exists('IntlChar') && printf("U+%X %s\n", IntlChar::ord($decoded), IntlChar::charName($decoded)); echo "\\x" . implode("\\x", str_split(strtoupper(bin2hex($decoded)), 2)), "\n"; echo addcslashes($decoded, "\x7F..\xFF"), "\n";
Output for git.master, git.master_jit, rfc.property-hooks
U+20AC EURO SIGN \xE2\x82\xAC \342\202\254

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:
36.95 ms | 405 KiB | 5 Q