3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = [ 0 => [ 'one' => 10, 'two' => 20, 'three' => 50, 'four' => 80, 'five' => 100], 1 => [ 'three' => 20, 'five' => 20, 'six' => 100, 'seven' => 10], 2 => [ 'one' => 30, 'three' => 30, 'five' => 10, 'eight' => 10] ]; $combined = []; foreach($input as $array) { foreach($array as $key => $value) { $combined[$key][] = $value; } } $combined = array_filter($combined, function($v, $k) use($input) { return count($v) == count($input); }, ARRAY_FILTER_USE_BOTH ); $averages = array_map(function($item) { return array_sum($item)/count($item); }, $combined); var_dump($averages);

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.140.0120.00917.54
8.4.130.0080.00219.35
8.4.120.0060.00222.25
8.4.110.0100.01122.17
8.4.100.0140.00517.72
8.4.90.0120.00917.72
8.4.80.0050.00419.31
8.4.70.0030.00617.81
8.4.60.0140.00718.85
8.4.50.0090.01117.64
8.4.40.0090.01219.34
8.4.30.0070.01317.61
8.4.20.0030.01719.56
8.4.10.0040.00419.68
8.3.270.0100.01016.39
8.3.260.0040.00616.84
8.3.250.0120.00618.75
8.3.240.0050.00319.11
8.3.230.0110.00916.83
8.3.220.0060.00218.55
8.3.210.0100.00816.45
8.3.200.0040.00516.63
8.3.190.0050.00318.90
8.3.180.0040.00518.34
8.3.170.0070.00719.08
8.3.160.0110.00718.21
8.3.150.0070.01020.80
8.3.140.0110.00716.70
8.3.130.0050.00316.73
8.3.120.0040.01120.50
8.3.110.0040.00420.94
8.3.100.0060.00324.06
8.3.90.0000.00826.77
8.3.80.0040.00419.36
8.3.70.0120.00616.63
8.3.60.0070.01516.75
8.3.50.0100.00817.37
8.3.40.0090.00918.84
8.3.30.0070.00718.54
8.3.20.0040.00420.07
8.3.10.0080.00023.52
8.3.00.0070.00023.70
8.2.290.0030.00620.58
8.2.280.0100.00918.61
8.2.270.0150.00017.22
8.2.260.0150.00018.46
8.2.250.0080.00016.47
8.2.240.0040.00417.01
8.2.230.0030.00722.58
8.2.220.0100.00737.54
8.2.210.0040.01126.77
8.2.200.0060.00318.88
8.2.190.0140.00716.63
8.2.180.0060.01218.54
8.2.170.0090.00622.96
8.2.160.0100.00320.25
8.2.150.0070.00025.66
8.2.140.0050.00324.66
8.2.130.0070.00022.26
8.2.120.0040.00426.35
8.2.110.0060.00319.19
8.2.100.0090.00317.84
8.2.90.0050.00318.03
8.2.80.0080.00019.23
8.2.70.0080.00017.50
8.2.60.0090.00017.80
8.2.50.0050.00318.34
8.2.40.0020.00520.47
8.2.30.0040.00421.10
8.2.20.0040.00418.17
8.2.10.0070.00018.18
8.2.00.0070.00018.11
8.1.330.0080.00422.02
8.1.320.0150.00516.16
8.1.310.0070.01116.54
8.1.300.0040.01115.90
8.1.290.0090.00030.84
8.1.280.0190.00325.92
8.1.270.0080.00023.87
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0030.00622.18
8.1.230.0040.00820.87
8.1.220.0000.00817.79
8.1.210.0090.00018.77
8.1.200.0060.00317.35
8.1.190.0060.00317.22
8.1.180.0040.00418.10
8.1.170.0050.00318.52
8.1.160.0040.00418.80
8.1.150.0000.00718.86
8.1.140.0000.00717.76
8.1.130.0030.00517.39
8.1.120.0040.00417.50
8.1.110.0080.00317.46
8.1.100.0000.00717.34
8.1.90.0030.00517.36
8.1.80.0070.00417.50
8.1.70.0040.00417.43
8.1.60.0000.00817.46
8.1.50.0040.00417.48
8.1.40.0030.00517.52
8.1.30.0040.00417.68
8.1.20.0030.00717.69
8.1.10.0000.00717.40
8.1.00.0080.00017.46
8.0.300.0040.00420.23
8.0.290.0000.00816.88
8.0.280.0030.00518.45
8.0.270.0000.00717.23
8.0.260.0040.00416.75
8.0.250.0070.00016.97
8.0.240.0050.00316.95
8.0.230.0080.00016.93
8.0.220.0040.00416.84
8.0.210.0040.00416.85
8.0.200.0050.00216.84
8.0.190.0000.01316.90
8.0.180.0040.00416.88
8.0.170.0000.00716.78
8.0.160.0000.00716.91
8.0.150.0040.00416.81
8.0.140.0000.00816.80
8.0.130.0030.00313.27
8.0.120.0000.00716.90
8.0.110.0060.00316.78
8.0.100.0000.00716.92
8.0.90.0060.00316.93
8.0.80.0070.00716.88
8.0.70.0040.00416.82
8.0.60.0040.00416.76
8.0.50.0070.00016.83
8.0.30.0130.00517.07
8.0.20.0110.00717.42
8.0.10.0070.00017.04
8.0.00.0100.00716.96
7.4.330.0030.00316.68
7.4.320.0000.00916.48
7.4.300.0000.00616.48
7.4.290.0030.00316.39
7.4.280.0040.00416.55
7.4.270.0070.00016.50
7.4.260.0000.00716.47
7.4.250.0000.00716.48
7.4.240.0020.00416.50
7.4.230.0040.00416.43
7.4.220.0140.01316.34
7.4.210.0100.01016.70
7.4.200.0030.00316.63
7.4.160.0140.00716.50
7.4.150.0060.01217.40
7.4.140.0120.00917.86
7.4.130.0140.00416.55
7.4.120.0120.00716.49
7.4.110.0130.00316.72
7.4.100.0090.01016.50
7.4.90.0070.01616.47
7.4.80.0170.00719.39
7.4.70.0070.01416.55
7.4.60.0080.00816.49
7.4.50.0020.01216.53
7.4.40.0060.01616.42
7.4.30.0060.01016.71
7.4.00.0090.00314.99
7.3.330.0000.00513.36
7.3.320.0000.00613.30
7.3.310.0070.00016.32
7.3.300.0030.00316.22
7.3.290.0070.00716.33
7.3.280.0090.00716.32
7.3.270.0120.00417.40
7.3.260.0130.00916.59
7.3.250.0100.00816.52
7.3.240.0080.00916.32
7.3.230.0040.01216.36
7.3.210.0060.01216.71
7.3.200.0110.00616.38
7.3.190.0130.00316.44
7.3.180.0110.01116.45
7.3.170.0090.00616.52
7.3.160.0100.00616.35
7.2.330.0140.00316.66
7.2.320.0060.01216.80
7.2.310.0200.00416.48
7.2.300.0070.01016.78
7.2.290.0030.01416.57
7.2.80.0070.00716.42
7.2.60.0150.00616.98
7.2.50.0060.00317.13
7.1.200.0030.00315.54
7.1.110.0000.01518.04
7.1.100.0120.00318.05
7.1.90.0070.01317.90
7.1.80.0030.01217.95
7.1.70.0040.00817.02
7.1.60.0180.01234.84
7.1.50.0270.01334.93
7.1.40.0260.01334.18
7.1.30.0430.01232.76
7.1.20.0360.01532.78
7.1.10.0370.01214.71
7.1.00.0060.00816.63
7.0.250.0100.00517.63
7.0.240.0060.00917.63
7.0.230.0000.01917.55
7.0.220.0100.01017.71
7.0.210.0060.01016.86
7.0.200.0030.01216.58
7.0.190.0230.01314.76
7.0.180.0140.00316.33
7.0.170.0090.00916.18
7.0.160.0060.00916.45
7.0.150.0050.01416.46
7.0.140.0030.01316.27
7.0.130.0220.00914.69
7.0.120.0030.01016.61
7.0.110.0160.01014.61
7.0.100.0250.01316.29
7.0.90.0270.00714.43
7.0.80.0080.00816.28
7.0.70.0000.01216.20
7.0.60.0200.01614.43
7.0.50.0070.00716.34
7.0.40.0130.01314.90
7.0.30.0120.01214.86
7.0.20.0080.00816.43
7.0.10.0030.01416.66
7.0.00.0000.01516.47

preferences:
29.73 ms | 403 KiB | 5 Q