3v4l.org

run code in 300+ PHP versions simultaneously
<?php $email = 'johnsnow123@ヒキワリ.ナットウ.ニホン'; $localAndDomain = explode('@', $email); if (count($localAndDomain) !== 2) { echo 'invalid'; } $local = $localAndDomain[0]; $localExpression = '^[a-z0-9_-]+(?:[a-z0-9._%+-]+)*$'; if (mb_eregi($localExpression, $local) === false) { echo 'invalid'; } // Handle IDN domains $domain = $localAndDomain[1]; $domain = str_replace('xn--', '', idn_to_ascii($domain)); $dictionary = Helper::$VALID_DOMAINS; $domainExpression = '^(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+(?:[A-Z]{2}|' . implode('|', $dictionary) . ')$'; if (mb_eregi($domainExpression, $domain) === false) { echo 'invalid'; } echo 'valid';
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Class "Helper" not found in /in/C4Fol:20 Stack trace: #0 {main} thrown in /in/C4Fol on line 20
Process exited with code 255.

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:
46.36 ms | 401 KiB | 8 Q