3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = '[specs product="test" category="body"]'; $pattern = '/(?:\[(?=[^][]*])(\w+)|\G(?!^))\h+(\w+)="([^"]+)"/'; $strings = [ '[specs product="test" category="body"]', '[pricelist keyword="216"]', '[specs product="test2" category="network" key="value"]' ]; foreach($strings as $s) { if (preg_match_all($pattern, $s, $matches)) { unset($matches[0]); $matches = array_map('array_filter', $matches); print_r($matches); } }

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.4.120.0040.00524.09
8.4.110.0070.00318.77
8.4.100.0150.00517.93
8.4.90.0130.00620.58
8.4.80.0100.00617.90
8.4.70.0040.00519.67
8.4.60.0060.01418.05
8.4.50.0090.01017.95
8.4.40.0100.01017.95
8.4.30.0100.01018.69
8.4.20.0100.01017.94
8.4.10.0040.01217.87
8.3.250.0100.00718.95
8.3.240.0100.00917.13
8.3.230.0080.00916.73
8.3.220.0110.00618.84
8.3.210.0140.00616.65
8.3.200.0110.00816.83
8.3.190.0090.00819.05
8.3.180.0120.00718.63
8.3.170.0180.00018.63
8.3.160.0090.00916.51
8.3.150.0180.00017.04
8.3.140.0090.00918.86
8.3.130.0000.00816.91
8.3.120.0040.01220.66
8.3.110.0000.00820.94
8.3.100.0060.00318.78
8.3.90.0150.00026.77
8.3.80.0060.00319.36
8.3.70.0150.00616.62
8.3.60.0040.01518.42
8.3.50.0070.01418.61
8.3.40.0150.00018.83
8.3.30.0130.00318.71
8.3.20.0070.00024.18
8.3.10.0050.00324.66
8.3.00.0050.00326.16
8.2.290.0110.00820.31
8.2.280.0100.00920.32
8.2.270.0120.00617.10
8.2.260.0000.01419.14
8.2.250.0150.00416.75
8.2.240.0060.00319.07
8.2.230.0000.00822.58
8.2.220.0100.00024.06
8.2.210.0040.00426.77
8.2.200.0030.00618.88
8.2.190.0100.00618.52
8.2.180.0100.00725.92
8.2.170.0140.00719.04
8.2.160.0150.00022.96
8.2.150.0000.00725.66
8.2.140.0090.00024.66
8.2.130.0070.00426.16
8.2.120.0040.00421.13
8.2.110.0030.00622.32
8.2.100.0080.00418.02
8.2.90.0000.00818.16
8.2.80.0080.00019.11
8.2.70.0000.00817.93
8.2.60.0000.00818.28
8.2.50.0140.00018.10
8.2.40.0050.00321.38
8.2.30.0000.00819.33
8.2.20.0000.00818.16
8.2.10.0040.00419.26
8.2.00.0070.00319.39
8.1.330.0100.00922.21
8.1.320.0060.01316.47
8.1.310.0040.00416.88
8.1.300.0090.00918.66
8.1.290.0090.00030.84
8.1.280.0090.00925.92
8.1.270.0000.00723.99
8.1.260.0060.00928.09
8.1.250.0090.00028.09
8.1.240.0060.00322.20
8.1.230.0040.00821.03
8.1.220.0040.00417.74
8.1.210.0080.00018.83
8.1.200.0120.00017.47
8.1.190.0060.00317.38
8.1.180.0050.00318.10
8.1.170.0030.00518.84
8.1.160.0000.00718.99
8.1.150.0070.00018.88
8.1.140.0070.00018.93
8.1.130.0050.00320.17
8.1.120.0030.00317.54
8.1.110.0050.00317.63
8.1.100.0030.00617.62
8.1.90.0040.00417.48
8.1.80.0040.00417.57
8.1.70.0030.00317.51
8.1.60.0030.00617.72
8.1.50.0000.00817.72
8.1.40.0060.00317.61
8.1.30.0040.00417.80
8.1.20.0080.00017.69
8.1.10.0050.00317.62
8.1.00.0000.00817.73
8.0.300.0040.00420.11
8.0.290.0080.00016.88
8.0.280.0040.00418.44
8.0.270.0000.00716.84
8.0.260.0050.00320.18
8.0.250.0000.00817.10
8.0.240.0070.00017.13
8.0.230.0030.00617.09
8.0.220.0070.00016.94
8.0.210.0030.00317.09
8.0.200.0030.00317.13
8.0.190.0060.00317.02
8.0.180.0040.00417.11
8.0.170.0040.00416.97
8.0.160.0040.00417.02
8.0.150.0000.00816.88
8.0.140.0040.00417.02
8.0.130.0050.00013.56
8.0.120.0030.00517.03
8.0.110.0040.00416.95
8.0.100.0030.00516.93
8.0.90.0040.00417.08
8.0.80.0110.00417.03
8.0.70.0050.00317.03
8.0.60.0040.00417.12
8.0.50.0040.00417.05
8.0.30.0100.00617.02
8.0.20.0030.01217.04
8.0.10.0080.01117.16
8.0.00.0100.01017.14
7.4.330.0050.00015.55
7.4.320.0000.00716.74
7.4.300.0030.00316.81
7.4.290.0000.00716.77
7.4.280.0070.00016.72
7.4.270.0030.00516.84
7.4.260.0030.00313.45
7.4.250.0000.00716.79
7.4.240.0060.00216.63
7.4.230.0070.00016.89
7.4.220.0020.00516.70
7.4.210.0060.01016.69
7.4.200.0030.00316.65
7.4.160.0110.00316.96
7.4.150.0080.00816.76
7.4.140.0060.00916.82
7.4.130.0080.00916.61
7.4.120.0060.00916.84
7.4.110.0170.00016.83
7.4.100.0080.00816.75
7.4.90.0040.01116.77
7.4.80.0070.00716.71
7.4.70.0110.00316.65
7.4.60.0090.00616.80
7.4.50.0070.00716.69
7.4.40.0060.01516.78
7.4.30.0090.01316.83
7.4.20.0070.01316.68
7.4.10.0120.00816.84
7.4.00.0030.01716.70
7.3.330.0050.00216.51
7.3.320.0000.00513.25
7.3.310.0030.00316.63
7.3.300.0040.00416.47
7.3.290.0060.00816.44
7.3.270.0000.01416.40
7.3.260.0080.00816.39
7.3.250.0040.01316.52
7.3.240.0120.00316.46
7.3.230.0070.00716.36
7.3.220.0100.00716.39
7.3.210.0090.00616.36
7.3.200.0070.00716.38
7.3.190.0030.01016.30
7.3.180.0000.01516.28
7.3.170.0130.00616.29
7.3.160.0040.01516.34
7.3.150.0060.01316.33
7.3.140.0070.01316.40
7.3.130.0140.00616.39
7.3.120.0100.01016.36
7.3.110.0100.00616.28
7.3.100.0070.00716.31
7.3.90.0080.00816.70
7.3.80.0030.01016.48
7.3.70.0030.01016.51
7.3.60.0100.00316.51
7.3.50.0000.01316.54
7.3.40.0100.00516.49
7.3.30.0070.00716.47
7.3.20.0060.00916.61
7.3.10.0120.00316.46
7.3.00.0090.00916.52

preferences:
30.99 ms | 403 KiB | 5 Q