3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ "action: Added; amount: 1; code: RNA1; name: Mens Organic T-shirt; colour: White; size: XL", "action: Subtracted; amount: 7; code: RNC1; name: Kids Basic T-shirt; colour: Denim Blue; size: 3-4y", "action: Added; amount: 20; code: RNV1; name: Gift Voucher; style: Mens; value: £20", ]; $keyed = array_reduce($arr, function($collector, $value) { $collector[] = array_reduce(explode('; ', trim($value, '; ')), function($collector, $value) { $parts = explode(': ', $value); $collector[$parts[0]] = $parts[1]; return $collector; }, []); return $collector; }, []); var_dump($keyed);

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.20.0070.01024.24
8.4.10.0100.01021.34
8.3.150.0060.00320.78
8.3.140.0090.00018.57
8.3.130.0060.00918.15
8.3.120.0160.00319.17
8.3.110.0110.00420.94
8.3.100.0030.00516.64
8.3.90.0040.00426.77
8.3.80.0100.00018.30
8.3.70.0150.00316.58
8.3.60.0150.00016.38
8.3.50.0130.00723.57
8.3.40.0030.01021.09
8.3.30.0080.00618.70
8.3.20.0040.00424.18
8.3.10.0000.00924.66
8.3.00.0080.00026.16
8.2.260.0180.00420.73
8.2.250.0090.00018.45
8.2.240.0060.00317.18
8.2.230.0030.00522.58
8.2.220.0060.00324.06
8.2.210.0070.00326.77
8.2.200.0080.00418.17
8.2.190.0120.00618.29
8.2.180.0100.01025.92
8.2.170.0190.00018.86
8.2.160.0080.00622.96
8.2.150.0000.00825.66
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0050.00326.16
8.2.110.0000.01120.52
8.2.100.0090.00317.78
8.2.90.0030.00517.97
8.2.80.0000.00817.97
8.2.70.0030.00517.93
8.2.60.0000.00818.22
8.2.50.0050.00318.10
8.2.40.0000.00719.33
8.2.30.0000.00719.30
8.2.20.0000.00718.08
8.2.10.0040.00419.35
8.2.00.0000.00719.38
8.1.310.0100.00016.55
8.1.300.0070.01718.32
8.1.290.0070.00430.84
8.1.280.0040.01825.92
8.1.270.0030.00522.19
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0070.01422.59
8.1.230.0120.00022.75
8.1.220.0040.00417.79
8.1.210.0060.00318.77
8.1.200.0000.01017.36
8.1.190.0000.00817.23
8.1.180.0050.00318.10
8.1.170.0080.00018.64
8.1.160.0090.00019.08
8.1.150.0030.00618.89
8.1.140.0070.00018.95
8.1.130.0000.00820.10
8.1.120.0000.00817.40
8.1.110.0060.00317.38
8.1.100.0070.00017.36
8.1.90.0040.00417.36
8.1.80.0080.00017.46
8.1.70.0030.00617.48
8.1.60.0090.00017.60
8.1.50.0040.00417.55
8.1.40.0080.00017.42
8.1.30.0060.00317.64
8.1.20.0030.00517.59
8.1.10.0040.00417.55
8.1.00.0060.00317.48
8.0.300.0040.00420.04
8.0.290.0030.00516.75
8.0.280.0030.00318.39
8.0.270.0000.00816.62
8.0.260.0000.00618.45
8.0.250.0070.00316.86
8.0.240.0040.00416.73
8.0.230.0030.00316.93
8.0.220.0030.00316.80
8.0.210.0040.00416.70
8.0.200.0040.00416.96
8.0.190.0070.00016.85
8.0.180.0040.00416.94
8.0.170.0030.00616.96
8.0.160.0080.00016.85
8.0.150.0080.00016.82
8.0.140.0000.00716.74
8.0.130.0000.00613.31
8.0.120.0000.00716.89
8.0.110.0000.00716.94
8.0.100.0050.00316.76
8.0.90.0000.00716.72
8.0.80.0060.01116.88
8.0.70.0050.00216.79
8.0.60.0040.00416.67
8.0.50.0040.00416.79
8.0.30.0100.00716.93
8.0.20.0130.00616.97
8.0.10.0040.00416.95
8.0.00.0170.00316.73
7.4.330.0060.00015.55
7.4.320.0030.00316.49
7.4.300.0000.00616.60
7.4.290.0030.00316.50
7.4.280.0070.00016.50
7.4.270.0040.00416.53
7.4.260.0000.00513.29
7.4.250.0070.00016.57
7.4.240.0030.00616.54
7.4.230.0030.00316.36
7.4.220.0020.00516.64
7.4.210.0060.00916.55
7.4.200.0020.00516.63
7.4.130.0100.01116.47
7.4.120.0120.01016.29
7.4.110.0090.01216.52
7.4.100.0100.01016.39
7.4.90.0090.00916.52
7.4.80.0110.00816.57
7.4.70.0040.01316.49
7.4.60.0180.00616.49
7.4.50.0190.00016.38
7.4.40.0050.01516.63
7.4.30.0160.00316.43
7.4.20.0140.00316.66
7.4.10.0090.00916.27
7.4.00.0120.00616.77
7.3.330.0000.00716.27
7.3.320.0050.00213.17
7.3.310.0000.00716.41
7.3.300.0000.00716.27
7.3.290.0060.00916.25
7.3.260.0120.00816.35
7.3.230.0060.01816.34
7.3.220.0060.01216.41
7.3.210.0110.00716.54
7.3.200.0170.00316.32
7.3.190.0150.00316.44
7.3.180.0100.01216.48
7.3.170.0110.01116.39
7.3.160.0030.01716.43
7.3.150.0180.00316.36
7.3.140.0120.00616.37
7.3.130.0110.00716.38
7.3.120.0040.01416.34
7.3.110.0130.01016.61
7.3.100.0060.01216.59
7.3.90.0070.01116.32
7.3.80.0180.00016.20
7.3.70.0090.00916.38
7.3.60.0180.00516.43
7.3.50.0110.00816.42
7.3.40.0120.00616.49
7.3.30.0110.00616.25
7.3.20.0080.01116.61
7.3.10.0060.01116.17
7.3.00.0200.00616.39
7.2.330.0120.00816.42
7.2.320.0190.00416.38
7.2.310.0130.01016.77
7.2.300.0060.01316.29
7.2.290.0160.00516.70
7.2.280.0060.01616.76
7.2.270.0060.01216.80
7.2.260.0060.01316.43
7.2.250.0070.01516.65
7.2.240.0070.01116.35
7.2.230.0110.00816.56
7.2.220.0150.00316.81
7.2.210.0140.00616.63
7.2.200.0050.01816.50
7.2.190.0130.01016.46
7.2.180.0140.00616.52
7.2.170.0130.00316.52
7.2.160.0100.00816.54
7.2.150.0120.00716.57
7.2.140.0070.01916.69
7.2.130.0150.00516.59
7.2.120.0090.01216.57
7.2.110.0110.00816.66
7.2.100.0070.01316.65
7.2.90.0120.00916.56
7.2.80.0100.01316.51
7.2.70.0090.01016.54
7.2.60.0170.00716.61
7.2.50.0060.01216.64
7.2.40.0120.00816.55
7.2.30.0120.00616.63
7.2.20.0130.00816.61
7.2.10.0110.01116.64
7.2.00.0110.00716.52

preferences:
75.69 ms | 403 KiB | 5 Q