3v4l.org

run code in 300+ PHP versions simultaneously
<?php $domainsToCheck = ["example3000.com", "m.example3000.com"]; function checkDomain($domain) { if (preg_match('/^([\p{L}\d\-]+)\.((?:[\p{L}\-]+\.?)+)$/ui', $domain, $m) === 1) { echo "{$domain} is good" . PHP_EOL; } else { echo "{$domain} is bad" . PHP_EOL; } } foreach ($domainsToCheck as $domain) { checkDomain($domain); }
Output for git.master, git.master_jit, rfc.property-hooks
example3000.com is good m.example3000.com is bad

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