3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [ 'a' => 'some value', 'b' => 'some value', 'c' => 'some value' ]; $b = [ 'a' => 'another value', 'd' => 'another value', 'e' => 'another value', 'f' => 'another value' ]; $c = [ 'b' => 'some more value', 'x' => 'some more value', 'y' => 'some more value', 'z' => 'some more value' ]; $defaults = array_fill_keys(array_keys($a + $b + $c), ''); $result = ['one' => $a, 'two' => $b, 'three' => $c]; foreach ($result as $k => &$row) { $row = array_merge($defaults, $row); } 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.4.140.0130.00817.52
8.4.130.0030.00617.67
8.4.120.0130.00622.30
8.4.110.0110.00920.44
8.4.100.0140.00617.71
8.4.90.0080.00117.91
8.4.80.0120.00819.56
8.4.70.0020.00617.70
8.4.60.0040.00618.75
8.4.50.0050.00418.69
8.4.40.0120.00617.74
8.4.30.0100.00620.77
8.4.20.0130.00719.59
8.4.10.0040.00422.13
8.3.270.0070.01216.46
8.3.260.0110.00816.45
8.3.250.0090.01019.05
8.3.240.0090.01016.66
8.3.230.0100.00916.46
8.3.220.0080.01317.14
8.3.210.0070.00716.65
8.3.200.0050.00316.60
8.3.190.0090.00816.90
8.3.180.0030.00518.34
8.3.170.0160.00320.77
8.3.160.0150.00416.94
8.3.150.0160.00317.43
8.3.140.0080.00016.91
8.3.130.0060.00316.91
8.3.120.0040.00420.59
8.3.110.0060.00318.24
8.3.100.0130.00316.50
8.3.90.0000.00826.77
8.3.80.0070.00318.31
8.3.70.0140.00016.58
8.3.60.0060.01316.75
8.3.50.0160.00620.27
8.3.40.0030.01020.38
8.3.30.0110.00318.61
8.3.20.0000.00724.18
8.3.10.0080.00024.66
8.3.00.0050.00326.16
8.2.290.0060.00520.43
8.2.280.0100.00918.64
8.2.270.0060.00319.00
8.2.260.0050.00316.56
8.2.250.0040.00418.33
8.2.240.0070.00317.28
8.2.230.0080.00820.94
8.2.220.0030.00724.06
8.2.210.0130.00326.77
8.2.200.0060.00316.75
8.2.190.0120.00318.29
8.2.180.0150.00925.92
8.2.170.0040.01118.95
8.2.160.0110.00322.96
8.2.150.0050.00325.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0070.00026.16
8.2.110.0100.00019.29
8.2.100.0070.00418.03
8.2.90.0040.00417.75
8.2.80.0080.00018.91
8.2.70.0040.01117.63
8.2.60.0060.00317.63
8.2.50.0040.00417.63
8.2.40.0030.00519.32
8.2.30.0050.00319.25
8.2.20.0110.00019.30
8.2.10.0070.00018.01
8.2.00.0000.00719.19
8.1.330.0100.00816.65
8.1.320.0090.01016.07
8.1.310.0050.00318.48
8.1.300.0090.00016.32
8.1.290.0000.00830.84
8.1.280.0140.00025.92
8.1.270.0080.00024.66
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00622.54
8.1.230.0100.00322.82
8.1.220.0040.00417.74
8.1.210.0090.00018.77
8.1.200.0050.00317.35
8.1.190.0030.00617.25
8.1.180.0030.00518.10
8.1.170.0040.00418.57
8.1.160.0050.00318.96
8.1.150.0060.00318.59
8.1.140.0040.00417.35
8.1.130.0070.00018.91
8.1.120.0000.00817.45
8.1.110.0020.00617.33
8.1.100.0130.00317.46
8.1.90.0170.00317.46
8.1.80.0000.01617.40
8.1.70.0090.00917.29
8.1.60.0110.00717.55
8.1.50.0120.00617.55
8.1.40.0140.00517.52
8.1.30.0080.01117.55
8.1.20.0150.00717.59
8.1.10.0150.00617.51
8.1.00.0110.00717.43
8.0.300.0090.00018.77
8.0.290.0040.00416.63
8.0.280.0000.00818.47
8.0.270.0050.00216.87
8.0.260.0060.00018.45
8.0.250.0000.00717.04
8.0.240.0000.00716.97
8.0.230.0050.01016.88
8.0.220.0110.00416.86
8.0.210.0110.00316.82
8.0.200.0110.00416.84
8.0.190.0090.00616.81
8.0.180.0150.00017.00
8.0.170.0080.00816.89
8.0.160.0100.00516.83
8.0.150.0120.00416.93
8.0.140.0120.00216.77
8.0.130.0120.00316.96
8.0.120.0110.00516.86
8.0.110.0090.00716.75
8.0.100.0130.00216.84
8.0.90.0100.00516.97
8.0.80.0070.00716.84
8.0.70.0050.01016.90
8.0.60.0150.00016.95
8.0.50.0120.00316.87
8.0.30.0060.01016.74
8.0.20.0130.00316.86
8.0.10.0100.00717.01
7.4.330.0050.00015.55
7.4.320.0050.00316.64
7.4.300.0040.01516.52
7.4.290.0130.00716.45
7.4.280.0070.01116.42
7.4.270.0080.00816.52
7.4.260.0180.00016.57
7.4.250.0130.00416.55
7.4.240.0140.00316.51
7.4.230.0170.00016.55
7.4.220.0100.00516.47
7.4.210.0150.00016.39
7.4.200.0100.00516.55
7.4.190.0120.00316.64
7.4.180.0150.00016.51
7.4.160.0130.00216.55
7.4.150.0080.00816.61
7.4.140.0100.00516.35
7.4.130.0120.00216.29
7.4.120.0150.00016.43
7.4.110.0140.00016.24
7.4.100.0100.00516.50
7.4.90.0070.00516.29
7.4.80.0050.00316.38
7.4.70.0050.00516.28
7.4.60.0050.00516.26
7.4.50.0000.00916.37
7.4.40.0090.00016.29
7.4.30.0050.00516.34
7.4.20.0000.00916.37
7.4.10.0060.00316.36
7.4.00.0080.00016.46

preferences:
30.68 ms | 403 KiB | 5 Q