3v4l.org

run code in 300+ PHP versions simultaneously
<?php $phone="971588471481"; $pattern = "/^(?:(?:00)?971)?(?:5[0124568]|[234679])\d{7}$/"; if(preg_match($pattern, $phone)) { echo "Match Result: valid Phone Number"; }else{ echo "Match Result: Phone number is not valid"; }
Output for git.master, git.master_jit, rfc.property-hooks
Match Result: valid Phone Number

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