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)) { $result[$matches[1]] = ['num1' => $matches[2], 'num2' => $matches[3], 'num3' => $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.5.10.0120.00818.77
8.5.00.0130.00820.15
8.4.150.0010.00114.05
8.4.140.0110.01117.74
8.4.130.0110.01018.09
8.4.120.0100.01124.23
8.4.110.0070.00319.80
8.4.100.0050.00418.90
8.4.90.0070.00518.86
8.4.80.0110.01020.75
8.4.70.0070.00918.00
8.4.60.0120.00917.71
8.4.50.0150.00717.96
8.4.40.0160.00318.05
8.4.30.0060.00320.45
8.4.20.0120.00818.13
8.4.10.0000.00917.57
8.3.280.0110.00818.66
8.3.270.0090.00916.94
8.3.260.0090.00816.86
8.3.250.0120.00718.88
8.3.240.0120.00818.72
8.3.230.0100.00816.73
8.3.220.0130.00518.95
8.3.210.0110.00816.75
8.3.200.0110.00916.85
8.3.190.0090.01016.80
8.3.180.0090.01116.61
8.3.170.0120.00317.20
8.3.160.0120.00616.70
8.3.150.0040.01518.80
8.3.140.0060.00916.62
8.3.130.0040.01516.58
8.3.120.0090.00920.73
8.3.110.0070.01517.04
8.3.100.0060.00318.84
8.3.90.0040.00426.77
8.3.80.0080.00016.75
8.3.70.0040.01116.88
8.3.60.0090.00618.55
8.3.50.0100.01020.36
8.3.40.0090.00618.96
8.3.30.0080.00818.97
8.3.20.0050.00324.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.290.0060.00320.50
8.2.280.0080.00616.88
8.2.270.0070.01019.16
8.2.260.0030.00618.84
8.2.250.0040.00416.69
8.2.240.0030.00617.05
8.2.230.0000.00920.94
8.2.220.0040.00424.06
8.2.210.0030.00526.77
8.2.200.0030.00718.66
8.2.190.0040.01116.88
8.2.180.0110.00825.92
8.2.170.0040.01119.03
8.2.160.0140.00022.96
8.2.150.0080.00025.66
8.2.140.0050.00324.66
8.2.130.0000.00826.16
8.2.120.0000.00821.13
8.2.110.0030.00720.52
8.2.100.0090.00317.84
8.2.90.0000.00819.30
8.2.80.0000.00918.05
8.2.70.0080.00017.75
8.2.60.0030.00518.03
8.2.50.0050.00317.93
8.2.40.0040.00420.19
8.2.30.0080.00017.97
8.2.20.0040.00420.53
8.2.10.0000.00717.92
8.2.00.0000.00719.33
8.1.330.0030.00722.16
8.1.320.0120.00816.46
8.1.310.0060.01218.51
8.1.300.0100.00618.20
8.1.290.0110.00030.84
8.1.280.0110.00725.92
8.1.270.0000.00724.66
8.1.260.0000.00926.35
8.1.250.0000.00728.09
8.1.240.0070.01022.72
8.1.230.0040.00817.83
8.1.220.0000.00817.79
8.1.210.0050.00318.77
8.1.200.0000.00917.38
8.1.190.0040.00417.35
8.1.180.0040.00418.10
8.1.170.0030.00517.62
8.1.160.0040.00418.96
8.1.150.0040.00418.80
8.1.140.0000.00717.48
8.1.130.0040.00420.30
8.1.120.0040.00417.64
8.1.110.0030.00517.51
8.1.100.0000.00917.46
8.1.90.0040.00417.51
8.1.80.0000.00817.65
8.1.70.0030.00317.59
8.1.60.0030.00517.70
8.1.50.0040.00417.70
8.1.40.0040.00417.67
8.1.30.0000.00917.67
8.1.20.0230.00017.80
8.1.10.0130.00917.66
8.1.00.0170.00417.45
8.0.300.0040.00418.77
8.0.290.0040.00416.88
8.0.280.0000.00718.60
8.0.270.0040.00416.87
8.0.260.0000.00818.44
8.0.250.0040.00417.12
8.0.240.0000.00717.09
8.0.230.0000.00717.12
8.0.220.0070.00017.04
8.0.210.0000.00717.05
8.0.200.0100.00017.14
8.0.190.0000.00717.12
8.0.180.0050.00516.96
8.0.170.0060.00316.97
8.0.160.0000.00817.04
8.0.150.0140.00416.80
8.0.140.0110.00516.73
8.0.130.0090.00916.86
8.0.120.0100.00716.86
8.0.110.0070.01016.97
8.0.100.0130.00416.88
8.0.90.0130.00416.94
8.0.80.0070.01016.95
8.0.70.0120.00616.98
8.0.60.0100.00716.91
8.0.50.0110.00716.84
8.0.30.0160.00316.99
8.0.20.0060.01216.94
8.0.10.0060.00617.08
7.4.330.0000.00515.55
7.4.320.0060.00016.80
7.4.300.0030.00316.73
7.4.290.0030.00316.66
7.4.280.0000.00716.82
7.4.270.0040.00716.71
7.4.260.0170.00016.73
7.4.250.0050.00516.68
7.4.240.0060.00316.64
7.4.230.0080.00416.80
7.4.220.0090.00416.57
7.4.210.0050.00816.64
7.4.200.0090.00316.75
7.4.190.0080.00516.71
7.4.180.0080.00416.77
7.4.160.0030.01216.81
7.4.150.0080.00816.74
7.4.140.0100.00316.69
7.4.130.0050.00716.67
7.4.120.0040.00816.55
7.4.110.0120.00016.68
7.4.100.0110.00016.66
7.4.90.0130.00016.60
7.4.80.0090.00316.61
7.4.70.0040.00916.76
7.4.60.0060.00616.67
7.4.50.0060.00616.58
7.4.40.0050.00516.66
7.4.30.0050.00516.55
7.4.20.0100.00316.64
7.4.10.0060.00716.68
7.4.00.0140.00316.63

preferences:
35.14 ms | 403 KiB | 5 Q