3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ 0 => ['ax' => 'Aland Islands'], 1 => ['as' => 'American Samoa'], 2 => ['am' => 'Armenia'] ]; $newArr = array_merge($arr[0], $arr[1], $arr[2]); print_r($newArr); $newArr2 = array_merge(...$arr); print_r($newArr2); foreach ($arr as $item){ $key = array_keys($item)[0]; @$newArr3[$key] = $item[$key]; } print_r($newArr3);

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.3.70.0110.00416.50
8.3.60.0140.00718.43
8.3.50.0130.00817.84
8.3.40.0130.00618.71
8.3.30.0070.01418.77
8.3.20.0060.01221.72
8.3.10.0180.00023.56
8.3.00.0100.00723.67
8.2.190.0120.00318.06
8.2.180.0110.01116.50
8.2.170.0150.00622.96
8.2.160.0100.01020.38
8.2.150.0190.00024.18
8.2.140.0130.00624.66
8.2.130.0090.00917.91
8.2.120.0040.00426.35
8.2.110.0000.01119.15
8.2.100.0040.00817.91
8.2.90.0100.00017.88
8.2.80.0040.00417.97
8.2.70.0000.00917.63
8.2.60.0040.00417.63
8.2.50.0080.00018.05
8.2.40.0000.00818.16
8.2.30.0040.00419.36
8.2.20.0000.00718.16
8.2.10.0040.00419.34
8.2.00.0050.00219.26
8.1.280.0140.00725.92
8.1.270.0000.00723.99
8.1.260.0050.00328.09
8.1.250.0080.00028.09
8.1.240.0090.00023.83
8.1.230.0090.00317.89
8.1.220.0040.00417.79
8.1.210.0080.00018.77
8.1.200.0070.00317.48
8.1.190.0000.00817.35
8.1.180.0030.00718.10
8.1.170.0030.00517.62
8.1.160.0000.00718.89
8.1.150.0030.00518.79
8.1.140.0070.00023.89
8.1.130.0070.00020.15
8.1.120.0000.00717.49
8.1.110.0080.00017.47
8.1.100.0000.00817.50
8.1.90.0030.00617.45
8.1.80.0000.00717.32
8.1.70.0030.00917.41
8.1.60.0060.00317.58
8.1.50.0000.00917.45
8.1.40.0000.00817.52
8.1.30.0000.00817.68
8.1.20.0000.00717.61
8.1.10.0000.00717.63
8.1.00.0030.00617.41
8.0.300.0050.00218.77
8.0.290.0000.00816.63
8.0.280.0040.00418.48
8.0.270.0030.00317.26
8.0.260.0000.00818.37
8.0.250.0060.00316.86
8.0.240.0040.00416.86
8.0.230.0030.00316.96
8.0.220.0000.00716.89
8.0.210.0040.00416.91
8.0.200.0040.00417.05
8.0.190.0040.00417.00
8.0.180.0030.00516.95
8.0.170.0000.00916.90
8.0.160.0060.00316.89
8.0.150.0030.00516.91
8.0.140.0000.00716.88
8.0.130.0050.00013.26
8.0.120.0000.00716.82
8.0.110.0020.00516.73
8.0.100.0040.00416.80
8.0.90.0040.00416.76
8.0.80.0060.00916.82
8.0.70.0070.00016.71
8.0.60.0000.00716.85
8.0.50.0000.00816.79
8.0.30.0120.01117.10
8.0.20.0090.00917.40
8.0.10.0030.00517.00
8.0.00.0050.01316.68
7.4.330.0030.00316.78
7.4.320.0030.00316.50
7.4.300.0060.00016.65
7.4.290.0040.00416.52
7.4.280.0050.00216.64
7.4.270.0070.00016.43
7.4.260.0000.00916.58
7.4.250.0070.00016.57
7.4.240.0050.00316.70
7.4.230.0000.00816.51
7.4.220.0080.00016.31
7.4.210.0090.00916.60
7.4.200.0070.00016.54
7.4.160.0110.00616.48
7.4.140.0080.00917.86
7.4.130.0140.00316.55
7.4.120.0070.01016.52
7.4.110.0070.01016.79
7.4.100.0110.00716.28
7.4.90.0090.00916.44
7.4.80.0080.00819.39
7.4.70.0030.01416.32
7.4.60.0040.01316.62
7.4.50.0040.01116.39
7.4.40.0110.01116.50
7.4.00.0070.00914.99
7.3.330.0000.00613.08
7.3.320.0000.00513.00
7.3.310.0000.00716.31
7.3.300.0030.00316.34
7.3.290.0020.00516.32
7.3.280.0080.00816.33
7.3.260.0090.01016.42
7.3.240.0090.01016.40
7.3.230.0120.00616.55
7.3.210.0100.00716.40
7.3.200.0070.01416.49
7.3.190.0110.01116.38
7.3.180.0120.00316.34
7.3.170.0100.00616.59
7.3.160.0130.00816.33
7.3.120.0110.00714.59
7.3.110.0100.00714.84
7.3.100.0070.00714.77
7.3.90.0100.00314.64
7.3.80.0080.00614.75
7.3.70.0030.01214.80
7.3.60.0100.00314.85
7.3.50.0090.00615.00
7.3.40.0110.00014.80
7.3.30.0040.01114.91
7.3.20.0040.01216.73
7.3.10.0080.00316.76
7.3.00.4280.00416.09
7.2.330.0060.01216.65
7.2.320.0070.01016.73
7.2.310.0150.00316.81
7.2.300.0100.00616.52
7.2.290.0060.01016.46
7.2.250.0040.01415.30
7.2.240.0100.01014.95
7.2.230.0100.00714.91
7.2.220.0060.01014.85
7.2.210.0090.00914.96
7.2.200.0100.00614.94
7.2.190.0090.00614.89
7.2.180.0070.00715.04
7.2.170.0000.01115.02
7.2.130.1410.00516.00
7.2.120.0100.00916.18
7.2.110.1260.00515.84
7.2.100.0210.00715.81
7.2.90.0090.00815.77
7.2.80.0100.00715.99
7.2.70.0080.01015.70
7.2.60.0090.00815.85
7.2.50.0300.00416.00
7.2.40.0090.00615.84
7.2.30.0070.00915.71
7.2.20.0100.00715.78
7.2.10.0120.00215.74
7.2.00.0040.01315.77
7.1.330.0100.00315.79
7.1.320.0030.00915.84
7.1.310.0120.00615.91
7.1.300.0040.00715.66
7.1.290.0070.00715.95
7.1.280.0040.01115.84
7.1.270.0090.00915.73
7.1.260.0030.00615.85
7.1.250.0450.01014.97
7.0.330.0120.01213.49
5.6.380.0100.00914.12

preferences:
16.8 ms | 401 KiB | 5 Q