3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = 'some text [person name="Jackson" family="Smith"] text [vehicle brand="Benz" type="SUV" doors="4" seats="7"] and [invalid closed="false" monkeywrench [lonetag] text [single gender="female"]'; foreach (preg_match_all('~\[(\w+)(?=(?: \w+="\w+")*])(]?)|(?:\G(?!^) (\w+)="(\w+)")~', $text, $out, PREG_SET_ORDER) ? $out : [] as $matches) { if ($matches[2]) { $result[$matches[1]] = []; } elseif (!isset($matches[3])) { $tag = $matches[1]; } else { $result[$tag][$matches[3]] = $matches[4]; } } var_export($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.4.120.0050.00420.72
8.4.110.0040.00518.89
8.4.100.0130.00818.00
8.4.90.0090.00418.75
8.4.80.0120.00418.18
8.4.70.0050.00417.95
8.4.60.0050.00418.72
8.4.50.0120.00817.97
8.4.40.0100.01017.82
8.4.30.0130.00720.41
8.4.20.0060.00318.72
8.4.10.0030.00617.91
8.3.250.0030.00619.09
8.3.240.0060.00216.75
8.3.230.0120.00816.42
8.3.220.0110.00717.16
8.3.210.0150.00416.64
8.3.200.0100.00916.79
8.3.190.0100.00917.20
8.3.180.0130.00516.61
8.3.170.0050.00316.63
8.3.160.0070.01316.99
8.3.150.0090.00617.35
8.3.140.0100.01016.76
8.3.130.0150.00618.66
8.3.120.0080.01120.78
8.3.110.0130.00720.94
8.3.100.0030.00624.06
8.3.90.0050.00326.77
8.3.80.0090.00017.97
8.3.70.0110.00416.88
8.3.60.0150.00018.81
8.3.50.0120.00818.64
8.3.40.0080.00819.09
8.3.30.0030.01318.96
8.3.20.0070.01121.81
8.3.10.0110.00423.48
8.3.00.0050.00322.39
8.2.290.0120.00920.24
8.2.280.0120.00918.50
8.2.270.0090.00916.95
8.2.260.0080.00018.68
8.2.250.0160.00318.99
8.2.240.0030.00617.48
8.2.230.0030.00622.58
8.2.220.0030.00637.54
8.2.210.0080.00626.77
8.2.200.0100.00016.75
8.2.190.0040.01116.75
8.2.180.0090.00918.31
8.2.170.0060.01219.07
8.2.160.0150.00322.96
8.2.150.0100.00024.18
8.2.140.0070.00024.66
8.2.130.0070.00726.16
8.2.120.0180.00026.16
8.2.110.0040.00721.31
8.2.100.0030.01017.91
8.2.90.0050.00318.22
8.2.80.0030.00618.05
8.2.70.0060.00318.04
8.2.60.0080.00018.22
8.2.50.0000.00818.10
8.2.40.0080.00019.51
8.2.30.0000.00719.22
8.2.20.0050.00218.07
8.2.10.0070.00019.27
8.2.00.0080.00019.27
8.1.330.0110.00822.02
8.1.320.0120.00716.16
8.1.310.0030.00516.99
8.1.300.0140.00719.88
8.1.290.0060.00318.88
8.1.280.0120.00325.92
8.1.270.0040.00422.20
8.1.260.0040.00426.35
8.1.250.0030.01028.09
8.1.240.0030.00722.11
8.1.230.0080.00422.70
8.1.220.0000.00817.74
8.1.210.0050.00318.85
8.1.200.0040.00417.47
8.1.190.0040.00417.50
8.1.180.0030.00918.10
8.1.170.0060.00318.62
8.1.160.0060.00318.93
8.1.150.0000.00718.84
8.1.140.0040.00420.84
8.1.130.0000.00720.21
8.1.120.0080.00017.46
8.1.110.0040.00417.49
8.1.100.0040.00417.58
8.1.90.0000.00917.50
8.1.80.0040.00417.64
8.1.70.0080.00017.49
8.1.60.0040.00417.64
8.1.50.0050.00217.63
8.1.40.0060.00317.60
8.1.30.0090.00317.79
8.1.20.0030.00817.82
8.1.10.0050.00317.70
8.1.00.0080.00017.73
8.0.300.0030.00521.97
8.0.290.0000.00816.75
8.0.280.0000.00818.39
8.0.270.0000.00717.30
8.0.260.0030.00320.16
8.0.250.0040.00417.10
8.0.240.0030.00516.95
8.0.230.0040.00416.98
8.0.220.0040.00416.99
8.0.210.0030.00316.94
8.0.200.0000.00617.09
8.0.190.0000.00716.98
8.0.180.0050.00316.97
8.0.170.0000.01117.07
8.0.160.0030.00616.92
8.0.150.0070.00017.06
8.0.140.0030.00617.02
8.0.130.0060.00013.46
8.0.120.0030.00617.07
8.0.110.0050.00217.00
8.0.100.0000.00717.02
8.0.90.0030.00616.95
8.0.80.0080.00717.05
8.0.70.0080.00017.00
8.0.60.0050.00216.89
8.0.50.0000.00716.86
8.0.30.0060.01017.03
8.0.20.0060.01617.33
8.0.10.0020.00516.95
8.0.00.0070.01017.07
7.4.330.0000.00615.55
7.4.320.0040.00416.73
7.4.300.0060.00016.68
7.4.290.0080.00016.79
7.4.280.0040.00416.83
7.4.270.0030.00316.72
7.4.260.0000.00613.52
7.4.250.0040.00416.69
7.4.240.0020.00616.79
7.4.230.0080.00016.64
7.4.220.0050.00216.89
7.4.210.0090.00716.77
7.4.200.0000.00716.85
7.4.130.0030.01416.79
7.4.120.0060.01216.84
7.4.110.0030.01416.63
7.4.100.0140.01216.73
7.4.90.0110.00616.91
7.4.80.0030.01419.39
7.4.70.0090.00716.70
7.4.60.0060.01116.73
7.4.50.0110.00716.68
7.4.40.0000.01616.76
7.4.00.0030.00915.30
7.3.330.0000.00716.32
7.3.320.0060.00013.24
7.3.310.0050.00216.35
7.3.300.0050.00316.39
7.3.290.0050.01216.47
7.3.280.0110.00716.49
7.3.260.0070.01116.69
7.3.240.0080.00916.51
7.3.230.0160.00016.67
7.3.210.0030.01416.95
7.3.200.0090.00616.77
7.3.190.0100.00716.95
7.3.180.0040.01216.44
7.3.170.0090.00916.75
7.3.160.0080.00816.71
7.3.90.0130.00714.98
7.3.80.0110.00314.82
7.3.70.0110.00314.92
7.3.60.0000.01214.80
7.3.50.0030.00914.78
7.3.40.0100.00315.07
7.3.30.0030.00915.02
7.3.20.0040.01214.95
7.3.10.0110.00414.96
7.3.00.0100.01015.11
7.2.330.0070.01716.95
7.2.320.0180.00016.62
7.2.310.0030.01316.94
7.2.300.0060.01016.62
7.2.290.0070.01616.79
7.2.220.0040.01115.33
7.2.210.0000.01415.44
7.2.200.0090.00614.96
7.2.190.0000.01414.98
7.2.180.0030.01015.20
7.2.170.0030.01015.02
7.2.160.0110.00415.18
7.2.150.0090.00815.10
7.2.140.0110.00615.08
7.2.130.0090.01515.55
7.2.120.0170.00015.21
7.2.110.0200.01015.44
7.2.100.0160.01315.46
7.2.90.0070.01715.34
7.2.80.0150.00915.38
7.2.70.0170.00615.12
7.2.60.0120.01215.29
7.2.50.0090.01515.49
7.2.40.0080.01615.02
7.2.30.0170.00015.35
7.2.20.0180.00615.07
7.2.10.0150.00615.23
7.2.00.0030.01315.29
7.1.320.0090.00613.86
7.1.310.0090.00613.73
7.1.300.0060.00814.23
7.1.290.0070.00714.08
7.1.280.0040.01114.15
7.1.270.0030.01513.87
7.1.260.0050.01014.15
7.1.250.0030.01414.15

preferences:
27.42 ms | 403 KiB | 5 Q