3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = [ 'aaa|45.85[u]52.22 - 43.75 - 36.5[d]25.75', 'bbb|238.4[u]345.45 - 24.1[d]13.85 - 56.4[d]56' ]; $result = []; foreach ($data as $element) { if (preg_match("#^([^|]+)\|(?:[^\]]+\])?(\S+) - (?:[^\]]+\])?(\S+) - (?:[^\]]+\])?(\S+)$#", $element, $matches)) { unset($matches[0]); $result[array_shift($matches)] = array_combine(['num1', 'num2', 'num3'], $matches); } } 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.5.00.0110.01120.30
8.4.150.0020.00014.05
8.4.140.0100.01117.57
8.4.130.0120.00418.02
8.4.120.0120.00720.82
8.4.110.0090.01022.53
8.4.100.0110.00418.00
8.4.90.0120.00618.57
8.4.80.0130.00617.79
8.4.70.0050.00318.18
8.4.60.0130.00918.65
8.4.50.0130.00820.25
8.4.40.0030.00717.93
8.4.30.0080.00318.50
8.4.20.0070.01019.93
8.4.10.0060.00317.93
8.3.280.0080.01118.44
8.3.270.0130.00716.86
8.3.260.0120.00816.83
8.3.250.0130.00618.82
8.3.240.0070.00316.81
8.3.230.0110.00916.64
8.3.220.0090.00917.05
8.3.210.0050.00321.06
8.3.200.0110.00816.68
8.3.190.0040.00417.24
8.3.180.0120.00618.44
8.3.170.0080.00017.12
8.3.160.0120.00618.76
8.3.150.0040.01518.56
8.3.140.0100.00017.29
8.3.130.0090.00618.56
8.3.120.0000.00919.05
8.3.110.0000.00820.94
8.3.100.0120.00016.91
8.3.90.0050.00326.77
8.3.80.0040.00416.73
8.3.70.0030.01216.73
8.3.60.0070.01416.63
8.3.50.0060.01320.32
8.3.40.0070.00718.76
8.3.30.0040.01118.81
8.3.20.0000.00724.18
8.3.10.0040.00424.66
8.3.00.0050.00326.16
8.2.290.0080.01120.68
8.2.280.0040.00518.68
8.2.270.0150.00417.16
8.2.260.0130.00716.99
8.2.250.0040.00416.73
8.2.240.0150.00017.43
8.2.230.0070.00322.58
8.2.220.0090.00024.06
8.2.210.0070.00726.77
8.2.200.0040.00416.63
8.2.190.0090.01217.00
8.2.180.0080.00825.92
8.2.170.0070.00719.00
8.2.160.0100.00322.96
8.2.150.0050.00325.66
8.2.140.0040.00424.66
8.2.130.0000.00926.16
8.2.120.0040.00426.16
8.2.110.0050.00522.39
8.2.100.0040.00817.83
8.2.90.0050.00319.16
8.2.80.0040.00417.97
8.2.70.0000.00817.75
8.2.60.0040.00418.03
8.2.50.0000.00918.07
8.2.40.0040.00420.00
8.2.30.0040.00418.15
8.2.20.0040.00420.46
8.2.10.0040.00417.82
8.2.00.0000.00719.40
8.1.330.0140.00522.28
8.1.320.0110.00916.61
8.1.310.0040.00418.68
8.1.300.0100.01018.23
8.1.290.0090.00030.84
8.1.280.0060.01025.92
8.1.270.0100.00023.99
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0070.00320.89
8.1.230.0040.00720.90
8.1.220.0050.00317.74
8.1.210.0030.00518.77
8.1.200.0060.00317.48
8.1.190.0040.00417.38
8.1.180.0000.00818.10
8.1.170.0040.00418.71
8.1.160.0040.00418.91
8.1.150.0030.00618.79
8.1.140.0040.00417.52
8.1.130.0000.00820.26
8.1.120.0000.00717.66
8.1.110.0000.00717.61
8.1.100.0040.00417.61
8.1.90.0030.00617.61
8.1.80.0000.01017.61
8.1.70.0030.00317.62
8.1.60.0000.00717.79
8.1.50.0040.00417.55
8.1.40.0080.00017.71
8.1.30.0040.00417.86
8.1.20.0040.00417.79
8.1.10.0040.00417.72
8.1.00.0000.00817.51
8.0.300.0070.00018.77
8.0.290.0040.00416.88
8.0.280.0000.00918.41
8.0.270.0030.00318.17
8.0.260.0060.00318.48
8.0.250.0040.00417.15
8.0.240.0030.00617.17
8.0.230.0000.00717.12
8.0.220.0070.00017.09
8.0.210.0070.00017.05
8.0.200.0060.00317.05
8.0.190.0040.00417.02
8.0.180.0040.00417.06
8.0.170.0000.00816.98
8.0.160.0040.00416.91
8.0.150.0000.00717.03
8.0.140.0050.00317.02
8.0.130.0060.00316.88
8.0.120.0020.00516.95
8.0.110.0030.00616.98
8.0.100.0000.00717.02
8.0.90.0040.00417.01
8.0.80.0000.00716.95
8.0.70.0040.00417.06
8.0.60.0040.00416.99
8.0.50.0040.00417.07
8.0.30.0000.00716.90
8.0.20.0000.00817.15
8.0.10.0050.00217.14
7.4.330.0000.00515.55
7.4.320.0050.00216.84
7.4.300.0050.00516.79
7.4.290.0050.00316.75
7.4.280.0000.00916.63
7.4.270.0030.00316.69
7.4.260.0000.00716.76
7.4.250.0070.00016.77
7.4.240.0000.00716.62
7.4.230.0050.00216.76
7.4.220.0000.00716.80
7.4.210.0070.00016.80
7.4.200.0040.00416.78
7.4.190.0050.00216.67
7.4.180.0020.00516.88
7.4.160.0000.00716.76
7.4.150.0030.00616.85
7.4.140.0000.01016.72
7.4.130.0040.00416.61
7.4.120.0050.00516.66
7.4.110.0040.00416.68
7.4.100.0070.00416.67
7.4.90.0000.01016.61
7.4.80.0040.00816.57
7.4.70.0100.00316.71
7.4.60.0070.00716.71
7.4.50.0080.00316.59
7.4.40.0000.01316.61
7.4.30.0120.00016.68
7.4.20.0100.00016.64
7.4.10.0100.00016.52
7.4.00.0050.00516.46

preferences:
148.95 ms | 403 KiB | 5 Q