3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ ['id' => 1, 'category' => 'Pizza', 'product' => 'Large Pizza', 'complement_type' => 'Bread', 'option' => 'Brown bread'], ['id' => 2, 'category' => 'Pizza', 'product' => 'Small Pizza', 'complement_type' => 'Bread', 'option' => 'White bread'], ['id' => 3, 'category' => 'Pizza', 'product' => 'Small Pizza', 'complement_type' => 'Ingredients', 'option' => 'Olives'], ['id' => 4, 'category' => 'Salads', 'product' => 'Green Salad', 'complement_type' => 'Extras', 'option' => 'Bacon'], ['id' => 5, 'category' => 'Salads', 'product' => 'Cesars Salad', 'complement_type' => 'Extras', 'option' => 'Lettuce'], ]; $result = []; foreach ($array as ['category' => $c, 'product' => $p, 'complement_type' => $t, 'option' => $result[$c][$p][$t]]); 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.0120.01019.81
8.4.150.0020.00014.05
8.4.140.0070.00317.71
8.4.130.0150.00617.52
8.4.120.0100.01020.77
8.4.110.0110.00818.86
8.4.100.0090.01218.59
8.4.90.0110.00818.89
8.4.80.0050.00318.75
8.4.70.0120.00718.05
8.4.60.0080.00318.86
8.4.50.0110.01018.77
8.4.40.0080.01123.97
8.4.30.0070.01418.75
8.4.20.0130.00717.90
8.4.10.0090.00023.77
8.3.280.0190.00618.18
8.3.270.0120.00816.74
8.3.260.0080.00916.57
8.3.250.0080.01118.97
8.3.240.0150.00516.72
8.3.230.0080.00916.38
8.3.220.0130.00619.23
8.3.210.0130.00716.92
8.3.200.0070.00116.60
8.3.190.0100.00917.05
8.3.180.0110.00817.18
8.3.170.0150.00320.61
8.3.160.0040.00416.72
8.3.150.0150.00417.14
8.3.140.0090.00019.05
8.3.130.0030.00616.70
8.3.120.0160.00019.10
8.3.110.0060.00320.94
8.3.100.0040.00724.06
8.3.90.0100.00726.77
8.3.80.0060.00317.97
8.3.70.0070.00718.31
8.3.60.0140.00318.56
8.3.50.0110.01116.73
8.3.40.0070.00723.61
8.3.30.0110.00418.52
8.3.20.0050.00324.18
8.3.10.0040.00424.66
8.3.00.0080.00026.16
8.2.290.0100.00820.31
8.2.280.0090.00718.64
8.2.270.0070.01117.25
8.2.260.0100.01016.40
8.2.250.0060.00316.57
8.2.240.0130.00618.69
8.2.230.0040.00422.58
8.2.220.0040.00437.54
8.2.210.0040.00426.77
8.2.200.0060.00316.63
8.2.190.0040.01516.88
8.2.180.0090.00616.50
8.2.170.0090.00622.96
8.2.160.0070.00722.96
8.2.150.0070.00025.66
8.2.140.0030.00624.66
8.2.130.0080.00026.16
8.2.120.0000.00820.65
8.2.110.0000.00820.52
8.2.100.0040.00717.84
8.2.90.0040.00417.97
8.2.80.0090.00017.97
8.2.70.0070.00417.75
8.2.60.0000.00817.50
8.2.50.0030.00517.55
8.2.40.0050.00319.47
8.2.30.0000.01417.75
8.2.20.0130.00317.61
8.2.10.0040.01217.70
8.2.00.0080.00817.68
8.1.330.0110.00821.88
8.1.320.0120.00816.00
8.1.310.0000.00816.80
8.1.300.0030.00617.91
8.1.290.0060.00330.84
8.1.280.0100.00725.92
8.1.270.0040.00424.66
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0090.00020.86
8.1.230.0110.00022.82
8.1.220.0050.00317.79
8.1.210.0040.00418.77
8.1.200.0090.00017.50
8.1.190.0080.00017.35
8.1.180.0040.00418.10
8.1.170.0030.00617.62
8.1.160.0030.00717.36
8.1.150.0070.00517.37
8.1.140.0070.00417.48
8.1.130.0080.00317.44
8.1.120.0110.00017.48
8.1.110.0000.01017.38
8.1.100.0050.00517.54
8.1.90.0070.00417.39
8.1.80.0060.00617.40
8.1.70.0000.01017.47
8.1.60.0090.00217.64
8.1.50.0070.00517.57
8.1.40.0030.00917.63
8.1.30.0000.01017.65
8.1.20.0000.01017.63
8.1.10.0070.00417.57
8.1.00.0070.00717.52
8.0.300.0040.00419.89
8.0.290.0040.00416.75
8.0.280.0100.00216.80
8.0.270.0090.00416.87
8.0.260.0090.00516.75
8.0.250.0060.00816.87
8.0.240.0070.00716.72
8.0.230.0150.00016.87
8.0.220.0120.00016.76
8.0.210.0070.00516.80
8.0.200.0070.00716.92
8.0.190.0100.00716.82
8.0.180.0140.00216.88
8.0.170.0080.00816.86
8.0.160.0140.00316.88
8.0.150.0070.00416.80
8.0.140.0080.00316.80
8.0.130.0120.00616.81
8.0.120.0060.00616.71
8.0.110.0140.00016.80
8.0.100.0080.00816.85
8.0.90.0080.00416.79
8.0.80.0120.00316.71
8.0.70.0000.01416.83
8.0.60.0120.00416.69
8.0.50.0210.00016.81
8.0.30.0130.00516.71
8.0.20.0110.00316.88
8.0.10.0120.00316.91

preferences:
28.14 ms | 403 KiB | 5 Q