3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern = '/^[a-zA-Z0-9!#$%&\'*+\\/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&\'*+\\/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$/'; preg_match('/^(.*<?)(.*)@(.*?)(>?)$/', 'philipptschiönder@dörler.co.at', $matches); var_dump($matches); $value = $matches[1] . idn_to_ascii($matches[2]) . '@' . idn_to_ascii($domain) . $matches[4]; $valid = preg_match($this->pattern, $value) || $this->allowName && preg_match($this->fullPattern, $value); echo $valid; ?>
Output for git.master, git.master_jit, rfc.property-hooks
array(5) { [0]=> string(32) "philipptschiönder@dörler.co.at" [1]=> string(18) "philipptschiönder" [2]=> string(0) "" [3]=> string(13) "dörler.co.at" [4]=> string(0) "" } Warning: Undefined variable $domain in /in/PBo98 on line 6 Deprecated: idn_to_ascii(): Passing null to parameter #1 ($domain) of type string is deprecated in /in/PBo98 on line 6 Fatal error: Uncaught Error: Using $this when not in object context in /in/PBo98:7 Stack trace: #0 {main} thrown in /in/PBo98 on line 7
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:
53.57 ms | 402 KiB | 8 Q