3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ [ 'price' => [ 'cost' => 200, 'tax' => 10, 'total' => 210 ], 'otherKey' => 'etc' ], [ 'price' => [ 'cost' => 500, 'tax' => 50, 'total' => 550 ], 'otherKey' => 'etc' ], [ 'price' => [ 'cost' => 600, 'tax' => 60, 'total' => 660 ], 'otherKey' => 'etc' ], ]; $result = []; foreach ($array as ['price' => ['total' => $result[]]]); 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.01119.91
8.4.150.0020.00114.05
8.4.140.0090.01217.53
8.4.130.0150.00518.68
8.4.120.0100.00924.32
8.4.110.0090.01122.50
8.4.100.0110.00917.71
8.4.90.0140.00618.39
8.4.80.0060.00417.80
8.4.70.0120.00917.60
8.4.60.0220.00818.02
8.4.50.0150.00918.13
8.4.40.0160.00418.60
8.4.30.0170.00317.77
8.4.20.0150.00617.58
8.4.10.0140.00319.53
8.3.280.0110.01018.32
8.3.270.0130.00616.53
8.3.260.0090.01016.63
8.3.250.0100.00918.86
8.3.240.0100.00617.20
8.3.230.0110.00716.48
8.3.220.0130.00717.37
8.3.210.0150.00316.59
8.3.200.0140.00316.54
8.3.190.0140.00716.76
8.3.180.0130.00617.22
8.3.170.0130.00617.46
8.3.160.0140.00516.47
8.3.150.0120.00416.78
8.3.140.0160.00316.68
8.3.130.0120.00617.06
8.3.120.0110.00417.29
8.3.110.0120.00318.11
8.3.100.0140.00418.93
8.3.90.0130.00420.42
8.3.80.0120.00617.11
8.3.70.0160.00516.34
8.3.60.0150.00517.19
8.3.50.0130.00716.55
8.3.40.0160.00518.12
8.3.30.0120.00917.79
8.3.20.0100.00419.71
8.3.10.0080.00619.78
8.3.00.0070.00420.28
8.2.290.0060.00320.71
8.2.280.0110.00617.14
8.2.270.0080.00616.87
8.2.260.0110.00417.29
8.2.250.0120.00417.12
8.2.240.0140.00417.20
8.2.230.0130.00318.43
8.2.220.0100.00523.56
8.2.210.0110.00319.80
8.2.200.0110.00516.35
8.2.190.0080.00916.46
8.2.180.0110.00616.40
8.2.170.0140.00818.06
8.2.160.0130.00419.30
8.2.150.0120.00520.23
8.2.140.0130.00519.90
8.2.130.0150.00420.35
8.2.120.0110.00418.47
8.2.110.0120.00518.91
8.2.100.0140.00717.63
8.2.90.0150.00617.61
8.2.80.0130.00417.98
8.2.70.0100.00533.07
8.2.60.0090.00632.96
8.2.50.0160.00633.46
8.2.40.0130.00533.45
8.2.30.0130.00833.45
8.2.20.0120.00833.41
8.2.10.0120.00733.36
8.2.00.0120.00533.42
8.1.330.0110.00723.67
8.1.320.0100.00516.18
8.1.310.0120.00516.37
8.1.300.0130.00416.70
8.1.290.0100.00421.09
8.1.280.0120.00619.44
8.1.270.0100.00419.73
8.1.260.0090.00620.33
8.1.250.0110.00420.81
8.1.240.0120.00319.47
8.1.230.0140.00417.86
8.1.220.0100.00417.63
8.1.210.0100.00417.61
8.1.200.0120.00332.73
8.1.190.0110.00532.70
8.1.180.0130.00533.15
8.1.170.0130.00433.29
8.1.160.0160.00333.14
8.1.150.0130.00633.28
8.1.140.0140.00333.19
8.1.130.0100.00833.28
8.1.120.0120.00733.29
8.1.110.0170.00433.29
8.1.100.0150.00433.24
8.1.90.0150.00333.34
8.1.80.0150.00433.26
8.1.70.0120.00733.21
8.1.60.0130.00533.40
8.1.50.0130.00533.34
8.1.40.0130.00433.32
8.1.30.0150.00433.46
8.1.20.0140.00433.38
8.1.10.0130.00533.37
8.1.00.0150.00533.37
8.0.300.0100.00516.92
8.0.290.0110.00432.19
8.0.280.0160.00432.86
8.0.270.0160.00432.94
8.0.260.0130.00533.02
8.0.250.0150.00332.94
8.0.240.0140.00432.97
8.0.230.0150.00532.95
8.0.220.0120.00832.97
8.0.210.0150.00532.90
8.0.200.0170.00432.95
8.0.190.0140.00432.94
8.0.180.0130.00732.97
8.0.170.0140.00533.02
8.0.160.0150.00432.91
8.0.150.0160.00832.93
8.0.140.0140.00632.95
8.0.130.0130.00433.03
8.0.120.0100.00732.89
8.0.110.0130.00532.93
8.0.100.0160.00132.90
8.0.90.0130.00532.88
8.0.80.0100.00732.91
8.0.70.0110.00632.88
8.0.60.0140.00332.88
8.0.50.0130.00532.96
8.0.30.0130.00632.91
8.0.20.0130.00433.06
8.0.10.0140.00533.05

preferences:
40.88 ms | 403 KiB | 5 Q