3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = <<<EOD [a-1]****************** [b-2]********** [c-3]*** EOD; preg_match_all('/^\[([a-z]-\d)](.*?)$/m' , $text, $matches, PREG_SET_ORDER); $result = array(); foreach ($matches as $match) { $result[$match[1]] = $match[2]; } var_dump($result);

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.40.0100.01019.10
8.3.30.0040.01118.92
8.3.20.0000.00819.05
8.3.10.0040.00420.79
8.3.00.0040.00417.75
8.2.170.0100.00622.96
8.2.160.0110.00422.33
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0030.00626.16
8.2.120.0000.00719.89
8.2.110.0060.00320.99
8.2.100.0030.00718.03
8.2.90.0030.00619.21
8.2.80.0050.00318.03
8.2.70.0080.00017.75
8.2.60.0050.00317.93
8.2.50.0080.00018.07
8.2.40.0000.00818.22
8.2.30.0000.00818.15
8.2.20.0050.00217.91
8.2.10.0070.00017.97
8.2.00.0040.00417.83
8.1.270.0050.00324.66
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0080.00320.87
8.1.230.0130.00021.04
8.1.220.0000.00817.74
8.1.210.0060.00318.95
8.1.200.0070.00317.47
8.1.190.0000.00817.55
8.1.180.0040.00418.10
8.1.170.0090.00018.79
8.1.160.0000.00819.00
8.1.150.0050.00318.71
8.1.140.0040.00417.61
8.1.130.0000.00717.92
8.1.120.0040.00417.52
8.1.110.0040.00417.55
8.1.100.0040.00317.60
8.1.90.0040.00417.59
8.1.80.0000.00717.62
8.1.70.0030.00317.49
8.1.60.0040.00417.74
8.1.50.0040.00417.58
8.1.40.0040.00417.63
8.1.30.0000.00917.77
8.1.20.0000.00817.87
8.1.10.0040.00417.69
8.1.00.0080.00017.68
8.0.300.0070.00019.98
8.0.290.0040.00417.00
8.0.280.0000.00718.43
8.0.270.0040.00417.32
8.0.260.0040.00417.03
8.0.250.0040.00417.06
8.0.240.0060.00317.11
8.0.230.0000.00917.13
8.0.220.0000.00717.04
8.0.210.0030.00317.08
8.0.200.0030.00317.23
8.0.190.0040.00417.04
8.0.180.0000.00717.02
8.0.170.0030.00717.09
8.0.160.0050.00217.00
8.0.150.0040.00417.01
8.0.140.0050.00717.02
8.0.130.0000.00513.45
8.0.120.0040.00416.95
8.0.110.0070.00016.99
8.0.100.0080.00016.99
8.0.90.0040.00417.01
8.0.80.0100.01017.14
8.0.70.0000.00716.96
8.0.60.0040.00416.97
8.0.50.0020.00517.00
8.0.30.0070.01217.22
8.0.20.0100.00817.16
8.0.10.0000.00717.21
8.0.00.0120.01117.04
7.4.330.0030.00313.20
7.4.320.0000.00716.80
7.4.300.0030.00316.86
7.4.290.0070.00016.71
7.4.280.0060.00316.73
7.4.270.0060.00316.73
7.4.260.0030.00313.52
7.4.250.0090.00016.68
7.4.240.0000.00716.85
7.4.230.0070.00016.56
7.4.220.0070.01416.68
7.4.210.0100.00816.82
7.4.200.0070.00016.86
7.4.190.0040.00416.72
7.4.160.0030.01216.65
7.4.150.0160.00716.81
7.4.140.0140.00516.74
7.4.130.0120.00816.85
7.4.120.0080.01016.76
7.4.110.0180.00616.70
7.4.100.0090.00916.96
7.4.90.0090.01217.01
7.4.80.0060.01316.74
7.4.70.0180.00316.61
7.4.60.0120.00616.70
7.4.50.0060.00316.61
7.4.40.0030.00916.72
7.4.30.0100.00716.59
7.4.00.0030.01115.26
7.3.330.0030.00313.21
7.3.320.0030.00313.46
7.3.310.0000.00816.65
7.3.300.0070.00016.51
7.3.290.0070.00716.49
7.3.280.0030.01216.59
7.3.270.0120.00616.73
7.3.260.0120.00616.64
7.3.250.0080.01016.65
7.3.240.0060.01016.78
7.3.230.0100.00616.63
7.3.210.0130.00316.50
7.3.200.0050.01419.39
7.3.190.0150.00916.52
7.3.180.0060.01016.72
7.3.170.0110.00716.92
7.3.160.0130.00916.82
7.3.120.0070.00915.01
7.3.110.0000.01615.02
7.3.100.0070.01115.28
7.3.90.0070.01014.84
7.3.80.0060.01214.96
7.3.70.0090.00614.88
7.3.60.0040.01414.84
7.3.50.0060.00614.85
7.3.40.0030.01314.92
7.3.30.0080.00314.68
7.3.20.0030.00617.00
7.3.10.0040.01116.63
7.3.00.0060.00617.00
7.2.330.0100.01016.70
7.2.320.0130.01016.92
7.2.310.0160.00716.67
7.2.300.0090.00916.82
7.2.290.0070.01016.80
7.2.250.0100.00315.20
7.2.240.0140.00315.16
7.2.230.0110.00715.36
7.2.220.0050.00515.10
7.2.210.0060.01214.97
7.2.200.0110.00315.10
7.2.190.0030.01215.25
7.2.180.0030.01315.09
7.2.170.0100.00715.25
7.1.330.0070.01015.94
7.1.320.0030.01015.98
7.1.310.0130.00316.04
7.1.300.0030.01016.14
7.1.290.0000.01215.88
7.1.280.0060.00816.00
7.1.270.0030.00916.13
7.1.260.0080.00416.00
7.1.70.0050.00317.19
7.1.60.0130.00019.40
7.1.50.0040.01817.29
7.1.00.0000.08022.48
7.0.200.0250.00914.63
7.0.140.0000.08022.15
7.0.120.0070.06722.18
7.0.60.0200.07319.91
7.0.50.0000.08717.90
7.0.40.0070.08019.98
7.0.30.0270.07020.11
7.0.20.0300.03320.18
7.0.10.0030.09320.18
7.0.00.0100.07020.10
5.6.280.0130.06321.09
5.6.210.0070.08320.65
5.6.200.0070.03718.10
5.6.190.0030.04720.47
5.6.180.0100.04720.67
5.6.170.0330.07020.62
5.6.160.0130.07720.33
5.6.150.0000.04018.18
5.6.140.0030.03718.12
5.6.130.0100.03318.14
5.6.120.0030.04321.11
5.6.110.0130.07721.11
5.6.100.0100.05720.98
5.6.90.0070.04021.03
5.6.80.0100.07720.50
5.5.350.0230.08020.48
5.5.340.0070.07318.00
5.5.330.0030.05020.43
5.5.320.0270.07320.27
5.5.310.0600.02720.18
5.5.300.0070.04318.02
5.5.290.0070.03717.98
5.5.280.0100.08020.98
5.5.270.0130.08320.75
5.5.260.0200.06320.75
5.5.250.0070.03720.61
5.5.240.0030.07720.36
5.4.450.0070.07719.53
5.4.440.0070.08019.41
5.4.430.0170.04019.11
5.4.420.0070.07719.51
5.4.410.0070.07719.20
5.4.400.0100.06318.81
5.4.390.0130.03318.91
5.4.380.0070.04318.87
5.4.370.0070.04719.13
5.4.360.0070.06318.92
5.4.350.0070.08319.15
5.4.340.0130.06318.79
5.4.320.0070.05319.09
5.4.310.0070.07019.09
5.4.300.0070.05019.15
5.4.290.0130.07318.79
5.4.280.0100.06319.13
5.4.270.0030.06318.91
5.4.260.0000.08019.07
5.4.250.0000.06019.15
5.4.240.0170.05719.17
5.4.230.0100.06319.15
5.4.220.0130.06019.08
5.4.210.0070.07318.90
5.4.200.0100.07318.78
5.4.190.0100.05319.16
5.4.180.0100.07719.13
5.4.170.0070.06319.14
5.4.160.0000.04319.12
5.4.150.0200.04319.15
5.4.140.0070.06016.33
5.4.130.0030.04716.27
5.4.120.0000.04316.46
5.4.110.0130.06016.28
5.4.100.0100.05716.34
5.4.90.0100.07016.39
5.4.80.0070.07016.35
5.4.70.0170.03716.32
5.4.60.0030.05016.26
5.4.50.0030.03716.29
5.4.40.0070.03316.28
5.4.30.0030.04716.20
5.4.20.0070.07316.34
5.4.10.0030.07016.25
5.4.00.0100.03315.72
5.3.290.0100.07714.64
5.3.280.0070.07714.38
5.3.270.0070.04714.57
5.3.260.0070.07714.54
5.3.250.0030.07714.53
5.3.240.0100.07014.50
5.3.230.0170.07314.68
5.3.220.0100.04014.45
5.3.210.0030.05714.45
5.3.200.0000.06714.58
5.3.190.0070.04314.36
5.3.180.0000.07714.50
5.3.170.0100.05714.50
5.3.160.0030.03714.58
5.3.150.0070.03714.38
5.3.140.0070.04014.48
5.3.130.0100.04714.48
5.3.120.0070.08014.47
5.3.110.0100.07014.44
5.3.100.0100.07013.97
5.3.90.0000.04013.97
5.3.80.0100.05714.10
5.3.70.0070.04313.80
5.3.60.0070.03713.94
5.3.50.0070.06313.76
5.3.40.0030.04313.87
5.3.30.0000.04714.02
5.3.20.0130.03313.61
5.3.10.0070.05013.60
5.3.00.0030.07313.58
5.2.170.0100.03711.22
5.2.160.0070.03010.96
5.2.150.0030.03311.07
5.2.140.0000.03711.13
5.2.130.0000.03311.09
5.2.120.0030.06311.09
5.2.110.0100.05710.92
5.2.100.0000.04011.03
5.2.90.0070.06311.08
5.2.80.0100.05011.06
5.2.70.0130.05011.02
5.2.60.0100.03010.87
5.2.50.0070.03310.95
5.2.40.0030.04010.98
5.2.30.0030.05310.92
5.2.20.0070.03710.91
5.2.10.0030.04710.75
5.2.00.0000.03310.71
5.1.60.0000.0579.90
5.1.50.0030.06310.02
5.1.40.0000.05310.13
5.1.30.0030.05310.41
5.1.20.0030.04010.34
5.1.10.0070.02710.06
5.1.00.0000.03010.09
5.0.50.0030.0508.53
5.0.40.0000.0508.41
5.0.30.0000.0708.22
5.0.20.0070.0278.25
5.0.10.0070.0238.08
5.0.00.0000.0708.20
4.4.90.0070.0208.00
4.4.80.0000.0208.00
4.4.70.0000.0238.00
4.4.60.0030.0378.00
4.4.50.0070.0308.00
4.4.40.0000.0578.00
4.4.30.0070.0308.00
4.4.20.0000.0408.00
4.4.10.0030.0338.00
4.4.00.0000.0578.00
4.3.110.0070.0308.00
4.3.100.0000.0378.00
4.3.90.0070.0138.00
4.3.80.0070.0478.00
4.3.70.0030.0178.00
4.3.60.0000.0238.00
4.3.50.0030.0378.00
4.3.40.0000.0508.00
4.3.30.0000.0378.00
4.3.20.0000.0408.00
4.3.10.0030.0308.00
4.3.00.0000.0278.00

preferences:
38.89 ms | 400 KiB | 5 Q