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]); } }

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.130.0050.00318.67
8.3.120.0130.00319.08
8.3.110.0160.00320.94
8.3.100.0060.00316.70
8.3.90.0120.00626.77
8.3.80.0030.00616.75
8.3.70.0060.00916.88
8.3.60.0120.00418.43
8.3.50.0090.00823.82
8.3.40.0130.00318.96
8.3.30.0070.01518.64
8.3.20.0070.00020.78
8.3.10.0060.00320.34
8.3.00.0050.00322.44
8.2.250.0090.00016.96
8.2.240.0030.01619.00
8.2.230.0160.00322.58
8.2.220.0080.00024.06
8.2.210.0000.00826.77
8.2.200.0040.00716.75
8.2.190.0120.00316.58
8.2.180.0130.00718.78
8.2.170.0090.00922.96
8.2.160.0060.00822.25
8.2.150.0090.00024.18
8.2.140.0060.00324.66
8.2.130.0080.00026.16
8.2.120.0080.00021.17
8.2.110.0030.00622.38
8.2.100.0040.00717.97
8.2.90.0050.00318.16
8.2.80.0080.00019.33
8.2.70.0030.00518.04
8.2.60.0050.00318.22
8.2.50.0040.00419.39
8.2.40.0030.00621.28
8.2.30.0050.00319.27
8.2.20.0040.00418.04
8.2.10.0050.00319.37
8.2.00.0050.00319.33
8.1.300.0030.01620.28
8.1.290.0030.00630.84
8.1.280.0180.00025.92
8.1.270.0080.00022.18
8.1.260.0050.00226.35
8.1.250.0070.00028.09
8.1.240.0060.00321.18
8.1.230.0090.00320.77
8.1.220.0090.00017.74
8.1.210.0000.00819.04
8.1.200.0070.00417.35
8.1.190.0040.00417.35
8.1.180.0050.00318.84
8.1.170.0090.00018.84
8.1.160.0000.00818.97
8.1.150.0030.00518.93
8.1.140.0020.00518.81
8.1.130.0000.00721.98
8.1.120.0040.00417.52
8.1.110.0000.00817.67
8.1.100.0000.00717.68
8.1.90.0060.00617.51
8.1.80.0040.00417.65
8.1.70.0030.00317.62
8.1.60.0030.00617.78
8.1.50.0080.00017.69
8.1.40.0030.00617.70
8.1.30.0080.00017.84
8.1.20.0050.00317.71
8.1.10.0040.00417.74
8.1.00.0080.00017.59
8.0.300.0040.00420.16
8.0.290.0070.00016.88
8.0.280.0040.00418.48
8.0.270.0070.00016.99
8.0.260.0030.00320.02
8.0.250.0070.00017.02
8.0.240.0040.00417.13
8.0.230.0030.00317.00
8.0.220.0000.00816.92
8.0.210.0030.00516.90
8.0.200.0030.00317.11
8.0.190.0030.00517.02
8.0.180.0040.00417.07
8.0.170.0040.00417.07
8.0.160.0000.00717.07
8.0.150.0030.00716.95
8.0.140.0050.00716.97
8.0.130.0000.00613.45
8.0.120.0030.00617.09
8.0.110.0020.00517.02
8.0.100.0000.00717.03
8.0.90.0000.00916.91
8.0.80.0020.01416.99
8.0.70.0000.00716.97
8.0.60.0050.00217.03
8.0.50.0030.00516.92
8.0.30.0030.01317.14
8.0.20.0110.00817.36
8.0.10.0000.00817.02
8.0.00.0100.01316.93
7.4.330.0050.00015.55
7.4.320.0030.00316.64
7.4.300.0040.00416.81
7.4.290.0030.00616.82
7.4.280.0030.00616.82
7.4.270.0050.00316.83
7.4.260.0000.00716.62
7.4.250.0030.00316.65
7.4.240.0030.00416.80
7.4.230.0080.00016.85
7.4.220.0030.00316.69
7.4.210.0100.00416.77
7.4.200.0000.00716.71
7.4.130.0080.01416.64
7.4.120.0060.01116.78
7.4.110.0060.01016.82
7.4.100.0040.01316.69
7.4.90.0030.01416.88
7.4.80.0090.00919.39
7.4.70.0060.01216.83
7.4.60.0090.00616.72
7.4.50.0020.01616.23
7.4.40.0110.00516.78
7.4.30.0070.01516.65
7.4.20.0070.01016.55
7.4.10.0130.00316.75
7.4.00.0110.01116.84
7.3.330.0050.00316.45
7.3.320.0000.00513.46
7.3.310.0040.00416.63
7.3.300.0000.00716.52
7.3.290.0130.00916.51
7.3.260.0150.00316.74
7.3.240.0090.01016.61
7.3.230.0110.00816.51
7.3.210.0080.00816.78
7.3.200.0120.00916.56
7.3.190.0180.00316.80
7.3.180.0030.01216.55
7.3.170.0130.00316.43
7.3.160.0040.01216.45
7.3.150.0090.00616.91
7.3.140.0030.01416.48
7.3.130.0040.01216.77
7.3.120.0030.01516.70
7.3.110.0070.01016.71
7.3.100.0080.01116.34
7.3.90.0070.01316.53
7.3.80.0110.01116.49
7.3.70.0030.01416.54
7.3.60.0100.01016.59
7.3.50.0170.00316.52
7.3.40.0100.00616.52
7.3.30.0080.00816.53
7.3.20.0070.01116.43
7.3.10.0060.01216.67
7.3.00.0190.00016.46
7.2.330.0000.01916.74
7.2.320.0100.00616.83
7.2.310.0100.00616.84
7.2.300.0030.01316.81
7.2.290.0170.00016.79
7.2.280.0120.00916.67
7.2.270.0060.01116.71
7.2.260.0120.00916.71
7.2.250.0030.01516.76
7.2.240.0070.01116.70
7.2.230.0160.00316.71
7.2.220.0060.01116.94
7.2.210.0000.01616.74
7.2.200.0070.01116.73
7.2.190.0170.00916.75
7.2.180.0060.01316.87
7.2.170.0130.00416.73
7.2.160.0130.00316.56
7.2.150.0110.00716.67
7.2.140.0090.01216.69
7.2.130.0170.00716.91
7.2.120.0030.01516.64
7.2.110.0120.01216.81
7.2.100.0170.00716.67
7.2.90.0110.01016.84
7.2.80.0420.01316.73
7.2.70.0170.00016.80
7.2.60.0030.01516.81
7.2.50.0110.00616.86
7.2.40.0030.01516.82
7.2.30.0090.00916.94
7.2.20.0110.00816.89
7.2.10.0120.01216.66
7.2.00.0120.00916.77

preferences:
27.38 ms | 403 KiB | 5 Q