3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strs = ["NLNL LL","LNLN LL LL","NNLL LL LL LL","LNLN LLL LL","LLNN LL LLL"]; foreach ($strs as $s) { echo "----------------------------\n$s\n"; if (preg_match('~(?:\s[A-Z]{2})+$~', $s, $match)) { print_r(explode(" ",trim($match[0]))); } if (preg_match_all('~(?:\G(?!\A)|(?=(?:\s[A-Z]{2})+$))\s\K[A-Z]{2}~', $s, $matches)) { print_r($matches[0]); } }
Output for git.master, git.master_jit, rfc.property-hooks
---------------------------- NLNL LL Array ( [0] => LL ) Array ( [0] => LL ) ---------------------------- LNLN LL LL Array ( [0] => LL [1] => LL ) Array ( [0] => LL [1] => LL ) ---------------------------- NNLL LL LL LL Array ( [0] => LL [1] => LL [2] => LL ) Array ( [0] => LL [1] => LL [2] => LL ) ---------------------------- LNLN LLL LL Array ( [0] => LL ) Array ( [0] => LL ) ---------------------------- LLNN LL LLL

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:
27.78 ms | 406 KiB | 5 Q