3v4l.org

run code in 300+ PHP versions simultaneously
<?php $urls = [ 'https://danielabruña.com/', 'https://fagualópez.com/', 'https://laconspiracióndelcastellano.com/', ]; foreach ($urls as $url) { $raw_domain = parse_url($url, PHP_URL_HOST); $encoded_domain = idn_to_ascii($raw_domain); $new_url = substr_replace($url, $encoded_domain, stripos($url, $raw_domain), strlen($raw_domain)); var_dump($url, $new_url); }
Output for git.master, git.master_jit, rfc.property-hooks
string(26) "https://danielabruña.com/" string(32) "https://xn--danielabrua-beb.com/" string(24) "https://fagualópez.com/" string(30) "https://xn--fagualpez-b7a.com/" string(41) "https://laconspiracióndelcastellano.com/" string(47) "https://xn--laconspiracindelcastellano-ctc.com/"

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:
415.33 ms | 406 KiB | 5 Q