3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern = "#^(([gG][iI][rR] {0,}0[aA]{2})|((([a-pr-uwyzA-PR-UWYZ][a-hk-yA-HK-Y]?[0-9][0-9]?)|(([a-pr-uwyzA-PR-UWYZ][0-9][a-hjkstuwA-HJKSTUW])|([a-pr-uwyzA-PR-UWYZ][a-hk-yA-HK-Y][0-9][abehmnprv-yABEHMNPRV-Y])))( {0,}[0-9][abd-hjlnp-uw-zABD-HJLNP-UW-Z]{2})?))$#"; $check = array( "LE1 1AA", "LE1", "SN5" ); $match = null; foreach($check as $c){ if(preg_match($pattern, $c, $match)){ echo "$c matches -> {$match[0]}\n"; } }
Output for git.master, git.master_jit, rfc.property-hooks
LE1 1AA matches -> LE1 1AA LE1 matches -> LE1 SN5 matches -> SN5

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