3v4l.org

run code in 300+ PHP versions simultaneously
<?php $aussie_mobiles = ['+614 1234 5678', '02 11112222', '(04)98765432', '0413572468', '+614 1 2 3 4 5 6 7 8']; foreach ($aussie_mobiles as $mob) { echo "$mob: "; if (preg_match('~^(?:\+614|\(04\)|04)(?: *\d){8}$~', $mob)) { echo "pass\n"; } else { echo "fail\n"; } }
Output for git.master, git.master_jit, rfc.property-hooks
+614 1234 5678: pass 02 11112222: fail (04)98765432: pass 0413572468: pass +614 1 2 3 4 5 6 7 8: pass

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