3v4l.org

run code in 300+ PHP versions simultaneously
<?php $my_array = ['a','b','c']; $dyn_array = [1, 2, 3]; $num = 2; $result = array_merge($my_array, ...array_fill(0, $num, $dyn_array)); print_r($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.120.0140.00620.45
8.4.110.0150.00518.85
8.4.100.0120.00917.79
8.4.90.0120.00718.71
8.4.80.0120.00817.66
8.4.70.0090.01017.50
8.4.60.0110.00920.86
8.4.50.0050.00317.68
8.4.40.0110.01119.09
8.4.30.0100.01019.41
8.4.20.0100.01020.29
8.4.10.0060.00319.40
8.3.250.0140.00518.86
8.3.240.0130.00516.54
8.3.230.0130.00716.27
8.3.220.0050.00317.20
8.3.210.0040.00316.69
8.3.200.0060.00316.67
8.3.190.0110.00816.89
8.3.180.0040.00316.43
8.3.170.0110.00718.94
8.3.160.0060.01217.03
8.3.150.0000.01918.97
8.3.140.0070.01117.09
8.3.130.0110.00318.23
8.3.120.0070.00418.84
8.3.110.0030.00520.94
8.3.100.0090.00924.06
8.3.90.0080.00026.77
8.3.80.0100.00317.97
8.3.70.0110.00716.38
8.3.60.0070.01118.05
8.3.50.0090.00917.04
8.3.40.0090.00618.72
8.3.30.0110.00418.75
8.3.20.0050.00318.48
8.3.10.0040.00423.48
8.3.00.0070.00023.56
8.2.290.0090.00620.66
8.2.280.0150.00618.23
8.2.270.0100.01018.83
8.2.260.0060.01216.32
8.2.250.0050.00316.44
8.2.240.0090.00017.23
8.2.230.0030.00722.58
8.2.220.0090.00637.54
8.2.210.0040.01426.77
8.2.200.0060.00318.16
8.2.190.0000.01416.58
8.2.180.0130.00316.75
8.2.170.0170.00318.82
8.2.160.0030.01022.96
8.2.150.0000.00924.18
8.2.140.0040.00424.66
8.2.130.0030.00521.03
8.2.120.0080.00026.35
8.2.110.0050.00519.31
8.2.100.0040.00717.78
8.2.90.0040.00417.63
8.2.80.0040.00418.79
8.2.70.0030.00518.04
8.2.60.0040.00417.89
8.2.50.0000.00818.10
8.2.40.0070.00019.01
8.2.30.0040.00419.23
8.2.20.0000.00818.00
8.2.10.0000.00818.29
8.2.00.0030.00319.42
8.1.330.0120.00621.92
8.1.320.0080.01116.17
8.1.310.0100.00318.45
8.1.300.0030.00619.56
8.1.290.0030.00618.88
8.1.280.0130.00725.92
8.1.270.0080.00020.54
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0000.00922.47
8.1.230.0060.00622.68
8.1.220.0040.00417.74
8.1.210.0030.00518.77
8.1.200.0060.00317.22
8.1.190.0030.00518.79
8.1.180.0040.00418.10
8.1.170.0000.00918.42
8.1.160.0070.00019.00
8.1.150.0040.00418.73
8.1.140.0040.00420.52
8.1.130.0070.00020.20
8.1.120.0040.00417.26
8.1.110.0030.00617.37
8.1.100.0000.00817.41
8.1.90.0040.00417.42
8.1.80.0040.00417.41
8.1.70.0080.00017.40
8.1.60.0000.00817.58
8.1.50.0040.00417.39
8.1.40.0040.00417.45
8.1.30.0070.00417.49
8.1.20.0100.00417.57
8.1.10.0150.00117.46
8.1.00.0120.00417.37
8.0.300.0050.00219.98
8.0.290.0070.00016.63
8.0.280.0030.00318.39
8.0.270.0030.00317.24
8.0.260.0070.00320.19
8.0.250.0060.00316.89
8.0.240.0060.00016.90
8.0.230.0030.00316.89
8.0.220.0030.00316.77
8.0.210.0040.00416.78
8.0.200.0060.00016.89
8.0.190.0050.00516.85
8.0.180.0040.00416.83
8.0.170.0000.00816.70
8.0.160.0050.00816.76
8.0.150.0060.00816.73
8.0.140.0040.00916.77
8.0.130.0080.00314.92
8.0.120.0100.00316.78
8.0.110.0100.00416.82
8.0.100.0080.00616.79
8.0.90.0100.00416.79
8.0.80.0130.00716.81
8.0.70.0060.00816.80
8.0.60.0070.00716.83
8.0.50.0080.00616.78
8.0.30.0100.01016.99
8.0.20.0170.00617.07
8.0.10.0080.00616.93
8.0.00.0110.01016.73
7.4.330.0020.00215.55
7.4.320.0060.00016.57
7.4.300.0060.00016.38
7.4.290.0050.00216.45
7.4.280.0070.00016.47
7.4.270.0090.00616.50
7.4.260.0070.00616.41
7.4.250.0090.00716.44
7.4.240.0100.00516.51
7.4.230.0090.00316.43
7.4.220.0080.00516.51
7.4.210.0100.00516.42
7.4.200.0050.00616.51
7.4.190.0130.00516.60
7.4.180.0170.00316.42
7.4.160.0120.00616.58
7.4.150.0190.00016.30
7.4.140.0140.00617.60
7.4.130.0140.00616.46
7.4.120.0090.00916.37
7.4.110.0140.00416.35
7.4.100.0100.00816.45
7.4.90.0100.00816.31
7.4.80.0130.00517.84
7.4.70.0060.01316.38
7.4.60.0120.00716.37
7.4.50.0110.00516.19
7.4.40.0130.00616.16
7.4.30.0110.00316.37
7.4.20.0120.00616.33
7.4.10.0080.00816.32
7.4.00.0100.00715.38
7.3.330.0140.00014.52
7.3.320.0100.00314.60
7.3.310.0070.00616.19
7.3.300.0110.00316.14
7.3.290.0100.00416.00
7.3.280.0080.00916.09
7.3.270.0140.00516.27
7.3.260.0110.00716.28
7.3.250.0210.00015.95
7.3.240.0110.00716.20
7.3.230.0150.00416.19
7.3.220.0150.00316.01
7.3.210.0110.00816.21
7.3.200.0110.00916.28
7.3.190.0100.00716.27
7.3.180.0100.00816.23
7.3.170.0100.00816.16
7.3.160.0160.00416.24
7.3.150.0150.00415.95
7.3.140.0180.00316.01
7.3.130.0200.00016.07
7.3.120.0080.00715.44
7.3.110.0090.01115.27
7.3.100.0120.00415.44
7.3.90.0130.00515.37
7.3.80.0050.01015.59
7.3.70.0110.00315.44
7.3.60.0130.00615.42
7.3.50.0100.00715.45
7.3.40.0080.00815.30
7.3.30.0100.00815.59
7.3.20.0120.00617.23
7.3.10.0080.00817.04
7.3.00.0100.00517.01
7.2.340.0160.00315.97
7.2.330.0160.00616.34
7.2.320.0120.00516.22
7.2.310.0140.00416.17
7.2.300.0090.00816.23
7.2.290.0090.01016.49
7.2.280.0160.00416.03
7.2.270.0180.00316.01
7.2.260.0140.00716.27
7.2.250.0130.00815.70
7.2.240.0120.00815.68
7.2.230.0110.01015.50
7.2.220.0090.01015.59
7.2.210.0130.00515.54
7.2.200.0120.00415.66
7.2.190.0080.00915.70
7.2.180.0140.00315.47
7.2.170.0120.00315.57
7.2.160.0100.01016.31
7.2.150.0110.01118.32
7.2.140.0130.00818.16
7.2.130.0160.00417.66
7.2.120.0080.00917.53
7.2.110.0130.00517.46
7.2.100.0160.00117.60
7.2.90.0120.00516.61
7.2.80.0170.00516.38
7.2.70.0240.00716.66
7.2.60.0180.00816.57
7.2.50.0130.01116.65
7.2.40.0110.01016.50
7.2.30.1200.00816.56
7.2.20.1580.00616.66
7.2.10.0140.00716.54
7.2.00.0110.01016.57
7.1.330.0100.00716.48
7.1.320.0110.00816.38
7.1.310.0120.00316.45
7.1.300.0100.00516.59
7.1.290.0100.00716.53
7.1.280.0130.00316.44
7.1.270.0100.00716.46
7.1.260.0060.00916.30
7.1.250.0120.00316.50
7.1.240.0130.00617.16
7.1.230.0110.00717.15
7.1.220.0150.00317.23
7.1.210.0120.00815.30
7.1.200.0610.00215.49
7.1.190.0140.00615.48
7.1.180.0130.00515.48
7.1.170.0140.00515.53
7.1.160.0430.00615.50
7.1.150.0100.01115.37
7.1.140.0610.00815.37
7.1.130.0270.00315.44
7.1.120.0130.00615.41
7.1.110.0120.01015.30
7.1.100.0110.00715.42
7.1.90.0370.00915.32
7.1.80.0030.01015.24
7.1.70.0140.00615.26
7.1.60.0220.00924.37
7.1.50.0530.00624.42
7.1.40.0240.00724.38
7.1.30.1620.00624.44
7.1.20.0180.01324.42
7.1.10.2460.00515.38
7.1.00.1390.00715.40
7.0.330.0170.00316.87
7.0.320.0180.00016.68
7.0.310.0140.00416.88
7.0.300.0310.00316.97
7.0.290.0190.00017.02
7.0.280.0210.00416.87
7.0.270.0160.00316.97
7.0.260.0140.00516.76
7.0.250.0140.00517.12
7.0.240.0180.00016.92
7.0.230.0130.00416.96
7.0.220.0150.00516.87
7.0.210.0150.00417.03
7.0.200.0140.00416.96
7.0.190.0160.00316.99
7.0.180.0060.01217.11
7.0.170.0180.00017.09
7.0.160.0140.00316.98
7.0.150.0200.00016.76
7.0.140.0160.00216.97
7.0.130.0140.00516.97
7.0.120.0130.00717.07
7.0.110.0180.00016.97
7.0.100.0150.00316.82
7.0.90.0250.00616.91
7.0.80.0130.00616.93
7.0.70.0200.00316.91
7.0.60.0120.00716.94
7.0.50.0100.01016.73
7.0.40.0180.00017.04
7.0.30.0090.00916.97
7.0.20.0140.00516.72
7.0.10.0140.00316.75
7.0.00.0060.01216.85
5.6.400.0140.00315.54
5.6.390.0170.00315.72
5.6.380.0140.00415.48
5.6.370.0130.00415.49
5.6.360.0130.00315.73
5.6.350.0200.00015.48
5.6.340.0120.00615.54
5.6.330.0100.00715.71
5.6.320.0110.00815.67
5.6.310.0140.00315.64
5.6.300.0140.00415.45
5.6.290.0120.00915.73
5.6.280.0100.01015.61
5.6.270.0180.00015.65
5.6.260.0130.00315.75
5.6.250.0100.00715.54
5.6.240.0080.00815.61
5.6.230.0170.00015.87
5.6.220.0170.00315.80
5.6.210.0090.00915.89
5.6.200.0100.00815.89
5.6.190.0150.00415.81
5.6.180.0160.00315.84
5.6.170.0120.00615.83
5.6.160.0110.00715.76
5.6.150.0110.00715.77
5.6.140.0110.00715.93
5.6.130.0160.00315.78
5.6.120.0180.00015.82
5.6.110.0170.00015.77
5.6.100.0170.00315.82
5.6.90.0150.00315.56
5.6.80.0100.01015.60
5.6.70.0180.00015.68
5.6.60.0140.00715.61
5.6.50.0170.00415.46
5.6.40.0210.00015.64
5.6.30.0160.00615.66
5.6.20.0160.00315.53
5.6.10.0190.00215.61
5.6.00.0210.00015.71

preferences:
32.43 ms | 403 KiB | 5 Q