3v4l.org

run code in 300+ PHP versions simultaneously
<?php $categorizedOptions = [ 'category' => [ '1' => [ 'name' => 'c1', 'attribute' => [ '1' => [ 'name' => 'a1', 'option' => [ '1' => [ 'name' => 'o1' ], '2' => [ 'name' => 'o2' ] ] ], '2' => [ 'name' => 'a2', 'option' => [ '3' => [ 'name' => 'o3' ], '4' => [ 'name' => 'o4' ] ] ] ] ], '2' => [ 'name' => 'c2', 'attribute' => [ '3' => [ 'name' => 'a3', 'option' => [ '5' => [ 'name' => 'o5' ], '6' => [ 'name' => 'o6' ] ] ], '4' => [ 'name' => 'a4', 'option' => [ '7' => [ 'name' => 'o7' ], '8' => [ 'name' => 'o8' ] ] ] ] ] ] ]; $final = []; foreach ($categorizedOptions as $categories) { foreach ($categories as $category => ['name' => $categoryname, 'attribute' => $attributes]) { foreach ($attributes as $attribute => ['name' => $attributename, 'option' => $options]) { foreach ($options as $option => ['name' => $optionname]) { $final[] = compact(['category', 'categoryname', 'attribute', 'attributename', 'option', 'optionname']); } } } } var_export($final);

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.120.0110.00620.57
8.4.110.0140.00622.32
8.4.100.0080.00317.65
8.4.90.0090.00517.83
8.4.80.0050.00422.42
8.4.70.0090.01117.92
8.4.60.0110.00818.73
8.4.50.0050.00419.50
8.4.40.0090.00917.74
8.4.30.0100.01020.39
8.4.20.0000.01017.95
8.4.10.0040.00422.15
8.3.250.0080.00718.82
8.3.240.0100.01016.61
8.3.230.0140.00516.62
8.3.220.0120.00619.13
8.3.210.0100.00416.56
8.3.200.0080.00816.69
8.3.190.0100.00917.37
8.3.180.0120.00616.47
8.3.170.0120.00618.78
8.3.160.0090.00916.52
8.3.150.0100.01020.55
8.3.140.0100.00016.86
8.3.130.0070.00316.54
8.3.120.0000.00920.86
8.3.110.0030.00520.94
8.3.100.0000.00822.27
8.3.90.0080.00026.77
8.3.80.0060.00319.36
8.3.70.0070.00716.58
8.3.60.0040.01516.63
8.3.50.0120.00923.64
8.3.40.0070.01418.89
8.3.30.0120.00318.67
8.3.20.0050.00324.18
8.3.10.0100.00024.66
8.3.00.0040.00426.16
8.2.290.0100.00920.45
8.2.280.0130.00718.21
8.2.270.0070.01117.15
8.2.260.0080.00018.37
8.2.250.0000.00816.72
8.2.240.0090.00017.38
8.2.230.0000.00822.58
8.2.220.0090.00024.06
8.2.210.0050.00326.77
8.2.200.0040.00718.88
8.2.190.0040.01118.33
8.2.180.0090.00625.92
8.2.170.0070.00718.96
8.2.160.0100.00322.96
8.2.150.0080.00025.66
8.2.140.0040.00424.66
8.2.130.0050.00226.16
8.2.120.0050.00319.95
8.2.110.0030.00620.47
8.2.100.0030.00919.54
8.2.90.0030.00517.75
8.2.80.0040.00418.73
8.2.70.0040.00418.04
8.2.60.0060.00318.16
8.2.50.0090.00018.10
8.2.40.0000.00819.33
8.2.30.0000.00719.45
8.2.20.0000.00718.04
8.2.10.0000.00819.25
8.2.00.0030.00619.38
8.1.330.0090.00921.89
8.1.320.0110.00817.65
8.1.310.0070.01018.66
8.1.300.0050.00318.74
8.1.290.0030.00630.84
8.1.280.0140.00725.92
8.1.270.0070.00322.13
8.1.260.0070.00026.35
8.1.250.0000.00728.09
8.1.240.0060.00320.77
8.1.230.0120.00320.61
8.1.220.0060.00317.74
8.1.210.0000.00818.77
8.1.200.0030.00717.23
8.1.190.0040.00417.10
8.1.180.0040.00418.10
8.1.170.0030.00618.53
8.1.160.0000.00718.96
8.1.150.0000.00818.91
8.1.140.0030.00318.87
8.1.130.0040.00420.07
8.1.120.0050.00217.49
8.1.110.0070.00017.43
8.1.100.0050.00317.44
8.1.90.0000.00817.36
8.1.80.0050.00217.51
8.1.70.0030.00317.41
8.1.60.0050.00317.62
8.1.50.0040.00417.43
8.1.40.0040.00417.51
8.1.30.0000.00817.61
8.1.20.0040.00417.59
8.1.10.0040.00417.66
8.1.00.0080.00017.39
8.0.300.0050.00318.77
8.0.290.0050.00316.63
8.0.280.0070.00018.53
8.0.270.0070.00016.72
8.0.260.0060.00018.38
8.0.250.0040.00416.95
8.0.240.0000.00716.95
8.0.230.0000.00716.95
8.0.220.0030.00516.98
8.0.210.0000.00716.98
8.0.200.0000.00816.94
8.0.190.0050.00316.91
8.0.180.0070.00016.83
8.0.170.0080.00016.84
8.0.160.0000.00816.91
8.0.150.0000.00816.84
8.0.140.0000.00716.77
8.0.130.0060.00013.32
8.0.120.0000.00916.86
8.0.110.0000.00716.92
8.0.100.0000.00716.95
8.0.90.0000.00716.87
8.0.80.0070.00816.86
8.0.70.0040.00416.86
8.0.60.0060.00316.71
8.0.50.0040.00416.96
8.0.30.0170.00716.79
8.0.20.0110.00717.16
8.0.10.0160.00317.05
8.0.00.0090.00917.11
7.4.330.0050.00015.55
7.4.320.0000.00616.65
7.4.300.0000.00616.64
7.4.290.0040.00416.46
7.4.280.0030.00716.59
7.4.270.0000.00716.44
7.4.260.0030.00313.27
7.4.250.0000.00816.50
7.4.240.0050.00216.51
7.4.230.0040.00416.44
7.4.220.0060.00116.62
7.4.210.0100.00416.67
7.4.200.0030.00316.65
7.4.150.0110.00716.63
7.4.140.0110.00716.26
7.4.130.0120.00616.42
7.4.120.0060.01316.47
7.4.110.0100.00716.47
7.4.100.0100.00716.57
7.4.90.0070.01016.36
7.4.80.0110.00716.54
7.4.70.0060.01216.41
7.4.60.0090.00916.48
7.4.50.0090.01016.19
7.4.40.0060.01116.40
7.4.30.0120.00616.47
7.4.20.0060.01316.54
7.4.10.0070.01016.71
7.4.00.0070.01116.52
7.3.330.0000.00716.46
7.3.320.0030.00313.19
7.3.310.0060.00016.29
7.3.300.0070.00016.38
7.3.290.0070.00716.34
7.3.270.0100.00716.30
7.3.260.0090.00916.45
7.3.250.0100.01016.36
7.3.240.0170.00316.55
7.3.230.0030.01316.37
7.3.220.0070.01116.57
7.3.210.0030.01516.29
7.3.200.0060.01216.28
7.3.190.0110.00716.37
7.3.180.0130.00316.41
7.3.170.0120.00616.47
7.3.160.0070.01016.39
7.3.150.0070.01116.55
7.3.140.0100.00716.45
7.3.130.0000.01716.49
7.3.120.0110.00716.28
7.3.110.0100.00716.69
7.3.100.0100.00716.33
7.3.90.0040.01516.52
7.3.80.0130.00316.40
7.3.70.0100.00716.51
7.3.60.0060.01016.54
7.3.50.0060.01016.34
7.3.40.0110.00716.43
7.3.30.0110.00616.41
7.3.20.0180.00616.39
7.3.10.0100.00716.58
7.3.00.0120.00616.39

preferences:
27.84 ms | 403 KiB | 5 Q