3v4l.org

run code in 300+ PHP versions simultaneously
<?php $def = array( 1 => 1, 2 => 1, 3 => 1); $fill = array( 2 => 0 ); $res = array_merge($def, $fill); print_r($res);

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.60.0160.00316.50
8.3.50.0170.00317.30
8.3.40.0030.01218.54
8.3.30.0070.00718.40
8.3.20.0080.00018.39
8.3.10.0030.00618.65
8.3.00.0000.00819.25
8.2.180.0060.00916.37
8.2.170.0100.00322.96
8.2.160.0100.00718.70
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0000.01019.44
8.2.110.0060.00320.39
8.2.100.0070.00417.78
8.2.90.0060.00319.21
8.2.80.0050.00317.97
8.2.70.0030.00617.38
8.2.60.0050.00317.80
8.2.50.0040.00417.55
8.2.40.0000.00819.35
8.2.30.0060.00317.51
8.2.20.0060.00317.48
8.2.10.0040.00417.59
8.2.00.0040.00417.69
8.1.280.0120.00425.92
8.1.270.0070.00023.99
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0030.00623.74
8.1.230.0000.01222.15
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0040.00417.23
8.1.190.0000.00917.10
8.1.180.0040.00418.10
8.1.170.0040.00417.62
8.1.160.0030.00419.08
8.1.150.0020.00518.61
8.1.140.0040.00417.38
8.1.130.0070.00017.31
8.1.120.0000.01017.40
8.1.110.0060.00317.32
8.1.100.0050.00217.34
8.1.90.0050.00317.33
8.1.80.0000.00717.27
8.1.70.0030.00317.30
8.1.60.0050.00217.56
8.1.50.0060.00317.30
8.1.40.0000.00817.44
8.1.30.0040.00417.52
8.1.20.0030.00517.58
8.1.10.0030.00617.47
8.1.00.0030.00517.32
8.0.300.0040.00418.77
8.0.290.0000.00716.63
8.0.280.0050.00318.47
8.0.270.0040.00417.08
8.0.260.0030.00318.38
8.0.250.0050.00316.77
8.0.240.0080.00016.86
8.0.230.0080.00016.77
8.0.220.0000.01016.77
8.0.210.0050.00316.81
8.0.200.0000.00716.83
8.0.190.0000.00816.94
8.0.180.0050.00316.86
8.0.170.0050.00316.91
8.0.160.0080.00016.79
8.0.150.0030.00616.73
8.0.140.0090.00216.65
8.0.130.0030.00313.20
8.0.120.0030.00616.70
8.0.110.0000.00816.76
8.0.100.0070.00016.93
8.0.90.0050.00316.85
8.0.80.0080.00816.84
8.0.70.0000.00716.70
8.0.60.0080.00016.60
8.0.50.0000.00816.63
8.0.30.0060.01217.04
8.0.20.0090.00916.87
8.0.10.0050.00216.91
8.0.00.0120.00816.72
7.4.330.0040.00012.86
7.4.320.0030.00316.50
7.4.300.0030.00316.51
7.4.290.0000.00616.38
7.4.280.0070.00016.38
7.4.270.0040.00416.52
7.4.260.0030.00313.23
7.4.250.0060.00316.43
7.4.240.0000.00716.44
7.4.230.0030.00516.63
7.4.220.0030.01216.42
7.4.210.0060.00916.54
7.4.200.0000.00716.46
7.4.190.0040.00416.61
7.4.160.0090.01216.35
7.4.150.0100.00716.21
7.4.140.0100.01017.86
7.4.130.0070.01016.45
7.4.120.0100.01316.22
7.4.110.0040.01516.48
7.4.100.0060.01116.32
7.4.90.0130.00316.32
7.4.80.0060.01219.39
7.4.70.0100.01016.28
7.4.60.0090.00616.24
7.4.50.0040.00016.32
7.4.40.0030.01016.46
7.4.30.0100.00716.43
7.4.00.0060.00914.95
7.3.330.0060.00013.04
7.3.320.0000.00712.87
7.3.310.0030.00316.08
7.3.300.0000.00716.03
7.3.290.0090.00516.13
7.3.280.0060.00915.99
7.3.270.0060.01216.28
7.3.260.0100.01016.51
7.3.240.0060.01116.35
7.3.230.0090.01016.16
7.3.210.0060.01316.29
7.3.200.0040.01316.28
7.3.190.0100.00716.29
7.3.180.0060.01616.10
7.3.170.0130.00316.29
7.3.160.0160.00616.19
7.3.120.0140.00314.72
7.3.10.0060.00316.59
7.3.00.0080.00016.71
7.2.330.0100.00716.50
7.2.320.0100.00716.61
7.2.310.0140.01116.28
7.2.300.0090.00916.21
7.2.290.0090.01016.54
7.2.130.0060.00916.71
7.2.120.0000.01116.66
7.2.110.0070.01016.59
7.2.100.0030.00916.72
7.2.90.0070.00717.01
7.2.80.0070.00716.80
7.2.70.0070.01016.57
7.2.60.0100.00716.75
7.2.50.0040.01016.88
7.2.40.0070.00716.69
7.2.30.0000.01516.66
7.2.20.0030.00616.82
7.2.10.0070.00716.74
7.2.00.0050.00718.00
7.1.250.0000.01515.50
7.1.200.0070.00415.84
7.1.100.0000.00817.86
7.1.70.0050.00316.88
7.1.60.0070.01719.21
7.1.50.0040.01916.89
7.1.00.0070.07322.36
7.0.200.0000.01016.75
7.0.140.0170.06322.09
7.0.120.0000.06722.17
7.0.60.0030.05019.87
7.0.50.0070.08017.78
7.0.40.0070.09020.13
7.0.30.0130.04720.11
7.0.20.0370.07320.21
7.0.10.0130.08020.22
7.0.00.0100.08020.32
5.6.210.0100.07020.46
5.6.200.0130.08018.23
5.6.190.0130.08020.33
5.6.180.3700.04720.54
5.6.170.0330.07020.60
5.6.160.0030.06320.55
5.6.150.0070.08318.14
5.6.140.0100.08018.28
5.6.130.0100.05318.16
5.6.120.0100.07720.98
5.6.110.0170.07321.14
5.6.100.0130.08321.10
5.6.90.0170.08020.98
5.6.80.0070.07720.50
5.6.00.0160.00015.56
5.5.350.0100.09020.32
5.5.340.0130.07717.96
5.5.330.0070.04020.13
5.5.320.0300.04320.41
5.5.310.0370.03320.29
5.5.300.0030.04718.08
5.5.290.0130.07717.98
5.5.280.0130.07720.87
5.5.270.0130.04320.85
5.5.260.0100.06720.87
5.5.250.0030.08720.70
5.5.240.0170.04720.14
5.4.450.0230.06319.30
5.4.440.0200.04719.52
5.4.430.0200.04319.64
5.4.420.0170.04019.41
5.4.410.0270.03319.46
5.4.400.0130.04019.23
5.4.390.0230.07019.15
5.4.380.0270.04319.06
5.4.370.0200.06719.22
5.4.360.0230.04319.14
5.4.350.0200.05319.30
5.4.340.0170.04718.95
5.4.320.0270.06718.85
5.4.310.0230.04719.13
5.4.300.0200.07318.94
5.4.290.0230.05018.98
5.4.280.0330.05719.22
5.4.270.0230.06019.08
5.4.260.0270.05319.05
5.4.250.0100.05018.97
5.4.240.0370.05019.21
5.4.230.0300.06719.14
5.4.220.0200.04719.07
5.4.210.0270.05719.07
5.4.200.0200.03719.23
5.4.190.0230.07019.07
5.4.180.0230.07319.12
5.4.170.0300.06719.09
5.4.160.0200.07318.82
5.4.150.0270.06019.13
5.4.140.0100.05016.52
5.4.130.0200.04016.50
5.4.120.0200.03316.30
5.4.110.0070.05716.54
5.4.100.0170.03716.64
5.4.90.0230.07016.37
5.4.80.0270.06316.43
5.4.70.0300.05016.43
5.4.60.0170.04316.56
5.4.50.0230.07316.52
5.4.40.0230.07716.51
5.4.30.0270.04716.51
5.4.20.0330.06316.18
5.4.10.0170.05016.23
5.4.00.0230.03715.94
5.3.290.0200.04314.63
5.3.280.0200.07314.48
5.3.270.0270.04014.50
5.3.260.0230.04314.60
5.3.250.0130.05314.62
5.3.240.0230.04014.65
5.3.230.0170.05714.81
5.3.220.0230.07014.58
5.3.210.0200.08014.46
5.3.200.0200.04014.48
5.3.190.0200.08314.48
5.3.180.0200.07014.47
5.3.170.0270.06714.69
5.3.160.0230.07314.63
5.3.150.0270.07014.53
5.3.140.0170.06314.66
5.3.130.0170.05714.51
5.3.120.0300.06714.52
5.3.110.0300.04014.46
5.3.100.0100.04014.25
5.3.90.0000.04013.93
5.3.80.0000.06713.93
5.3.70.0000.07013.93
5.3.60.0600.04714.02
5.3.50.0130.03714.05
5.3.40.0300.06014.16
5.3.30.0230.04713.81
5.3.20.0200.04313.66
5.3.10.0200.03313.72
5.3.00.0200.05013.62
5.2.170.0100.04312.24
5.2.160.0130.05012.24
5.2.150.0170.03712.24
5.2.140.0130.03012.24
5.2.130.0170.04312.24
5.2.120.0170.05712.24
5.2.110.0230.05712.24
5.2.100.0130.03712.24
5.2.90.0200.05712.24
5.2.80.0200.03012.24
5.2.70.0170.06012.24
5.2.60.0130.05012.24
5.2.50.0200.03712.24
5.2.40.0170.03712.24
5.2.30.0100.05312.24
5.2.20.0200.04712.24
5.2.10.0200.05712.24
5.2.00.0130.03712.24
5.1.60.0200.02312.24
5.1.50.0270.04312.24
5.1.40.0100.03012.24
5.1.30.0330.03712.24
5.1.20.0130.03012.24
5.1.10.0200.03012.24
5.1.00.0230.05012.24
5.0.50.0200.03312.24
5.0.40.0100.02312.24
5.0.30.0070.03712.24
5.0.20.0130.02012.24
5.0.10.0130.03012.24
5.0.00.0130.06312.24
4.4.90.0130.02012.24
4.4.80.0070.02012.24
4.4.70.0070.03312.24
4.4.60.0000.02712.24
4.4.50.0000.02012.24
4.4.40.0170.04712.24
4.4.30.0030.03712.24
4.4.20.0070.02012.24
4.4.10.0100.03712.24
4.4.00.0100.05012.24
4.3.110.0100.02312.24
4.3.100.0070.02012.24
4.3.90.0100.02312.24
4.3.80.0100.04312.24
4.3.70.0130.02712.24
4.3.60.0100.03312.24
4.3.50.0100.03312.24
4.3.40.0100.05012.24
4.3.30.0070.02312.24
4.3.20.0070.03712.24
4.3.10.0070.03312.24
4.3.00.0070.02012.24

preferences:
46.18 ms | 401 KiB | 5 Q