3v4l.org

run code in 300+ PHP versions simultaneously
<?php $multi = [ "A2" => [ 0 => "A1", 1 => "A2", 2 => "A3", ], "A1" => [ 0 => "A1", 1 => "A6", 2 => "A5", 3 => "A2", ], "A6" => [ 0 => "A3", ], "A3" => [ 0 => "A3", 1 => "A2", ], "A5" => [ 0 => "A4" ], "A4" => [ 0 => "A4", 1 => "A3", ] ]; $single = [ "A1" => 675.58333333333, "A2" => 1786.75, "A3" => 2897.9166666667, "A4" => 4009.0833333333, "A5" => 5120.25, "A6" => 6231.4166666667, ]; $result = []; foreach ($multi as $key => $row) { $values = array_intersect_key($single, array_flip($row)); $result[$key] = array_sum($values) / count($values); } 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.10.0120.00816.73
8.5.00.0120.00920.24
8.4.160.0110.01023.87
8.4.150.0020.00114.05
8.4.140.0120.00817.68
8.4.130.0110.00917.64
8.4.120.0050.00320.80
8.4.110.0110.01022.61
8.4.100.0130.00717.67
8.4.90.0150.00519.36
8.4.80.0040.00417.85
8.4.70.0080.00717.84
8.4.60.0110.00818.74
8.4.50.0090.01017.59
8.4.40.0100.01017.41
8.4.30.0120.00819.06
8.4.20.0100.01019.57
8.4.10.0100.00719.57
8.3.280.0100.01018.36
8.3.270.0100.00916.30
8.3.260.0110.00716.41
8.3.250.0110.00818.78
8.3.240.0080.01116.51
8.3.230.0080.00816.55
8.3.220.0040.00417.16
8.3.210.0080.01116.49
8.3.200.0070.00416.51
8.3.190.0080.00519.10
8.3.180.0050.00316.80
8.3.170.0000.01018.81
8.3.160.0110.00716.98
8.3.150.0130.00616.82
8.3.140.0000.00817.36
8.3.130.0050.00318.38
8.3.120.0050.00318.82
8.3.110.0060.00320.94
8.3.100.0130.00616.41
8.3.90.0040.00426.77
8.3.80.0000.00916.63
8.3.70.0140.00316.63
8.3.60.0000.01616.57
8.3.50.0110.00416.57
8.3.40.0070.01021.84
8.3.30.0070.00720.17
8.3.20.0180.00323.47
8.3.10.0060.01923.66
8.3.00.0130.00620.71
8.2.290.0040.00320.48
8.2.280.0120.00818.61
8.2.270.0040.00418.83
8.2.260.0000.00716.70
8.2.250.0080.00018.44
8.2.240.0000.01017.06
8.2.230.0000.00922.58
8.2.220.0060.00324.06
8.2.210.0070.00026.77
8.2.200.0050.00516.23
8.2.190.0060.01216.63
8.2.180.0140.00416.50
8.2.170.0110.00418.90
8.2.160.0070.00722.96
8.2.150.0120.00621.05
8.2.140.0160.00322.12
8.2.130.0140.00422.30
8.2.120.0150.00321.08
8.2.110.0040.01121.07
8.2.100.0090.00620.88
8.2.90.0100.00720.73
8.2.80.0100.00621.13
8.2.70.0040.01220.50
8.2.60.0110.00320.62
8.2.50.0070.00721.00
8.2.40.0000.01420.55
8.2.30.0040.01120.42
8.2.20.0070.01120.41
8.2.10.0130.00320.57
8.2.00.0030.01420.37
8.1.330.0150.00218.49
8.1.320.0100.00716.25
8.1.310.0070.00718.36
8.1.300.0040.00420.04
8.1.290.0070.00330.84
8.1.280.0140.00725.92
8.1.270.0000.01423.77
8.1.260.0040.01123.85
8.1.250.0070.00723.98
8.1.240.0110.00420.40
8.1.230.0110.00320.40
8.1.220.0120.00320.66
8.1.210.0040.01120.39
8.1.200.0100.00320.57
8.1.190.0100.00320.41
8.1.180.0070.01020.33
8.1.170.0100.00320.39
8.1.160.0090.00620.41
8.1.150.0060.00920.64
8.1.140.0090.00620.45
8.1.130.0000.01520.65
8.1.120.0060.01220.46
8.1.110.0110.00420.16
8.1.100.0060.00920.33
8.1.90.0040.01120.34
8.1.80.0040.01121.56
8.1.70.0120.00320.32
8.1.60.0140.00320.46
8.1.50.0160.00020.51
8.1.40.0120.00320.54
8.1.30.0060.00920.64
8.1.20.0090.00621.66
8.1.10.0070.01120.35
8.1.00.0100.00720.16

preferences:
37.17 ms | 403 KiB | 5 Q