3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = array("red", "green", "blue", "yellow", "1", "2", "3","4"); array_splice($input, -1, 3); #array_splice($input, -1, 1, array("black", "maroon")); #array_splice($input, 1, -3); print_r($input);

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.0130.00718.18
8.3.50.0120.00621.93
8.3.40.0140.00718.68
8.3.30.0100.00718.97
8.3.20.0000.00720.21
8.3.10.0040.00421.60
8.3.00.0000.00817.79
8.2.180.0110.01116.63
8.2.170.0180.00422.96
8.2.160.0030.01020.29
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0000.00820.85
8.2.110.0100.00019.27
8.2.100.0060.00617.78
8.2.90.0040.00419.09
8.2.80.0000.00817.97
8.2.70.0030.00617.63
8.2.60.0060.00317.91
8.2.50.0080.00018.07
8.2.40.0040.00418.22
8.2.30.0070.00317.97
8.2.20.0040.00417.62
8.2.10.0040.00417.98
8.2.00.0070.00017.66
8.1.280.0130.00725.92
8.1.270.0080.00023.83
8.1.260.0070.00026.35
8.1.250.0080.00028.09
8.1.240.0030.00622.07
8.1.230.0050.00518.95
8.1.220.0000.00817.74
8.1.210.0050.00318.77
8.1.200.0030.00617.35
8.1.190.0030.00617.10
8.1.180.0060.00318.10
8.1.170.0000.01018.66
8.1.160.0040.00421.82
8.1.150.0040.00418.71
8.1.140.0070.00017.27
8.1.130.0000.00717.82
8.1.120.0030.00317.25
8.1.110.0050.00217.27
8.1.100.0070.00017.41
8.1.90.0040.00417.35
8.1.80.0040.00317.40
8.1.70.0030.00317.36
8.1.60.0090.00017.54
8.1.50.0040.00417.40
8.1.40.0000.00817.31
8.1.30.0040.00417.41
8.1.20.0050.00317.48
8.1.10.0040.00417.48
8.1.00.0060.00317.45
8.0.300.0040.00418.77
8.0.290.0030.00616.63
8.0.280.0000.00718.29
8.0.270.0070.00017.18
8.0.260.0030.00317.18
8.0.250.0050.00216.89
8.0.240.0030.00316.86
8.0.230.0030.00316.90
8.0.220.0000.00816.77
8.0.210.0040.00416.71
8.0.200.0040.00416.86
8.0.190.0000.00816.78
8.0.180.0040.00416.71
8.0.170.0030.00616.81
8.0.160.0000.00716.88
8.0.150.0030.00616.80
8.0.140.0000.00716.79
8.0.130.0000.00513.22
8.0.120.0080.00016.68
8.0.110.0020.00516.84
8.0.100.0040.00416.71
8.0.90.0000.00816.69
8.0.80.0060.01416.81
8.0.70.0000.00716.68
8.0.60.0070.00016.88
8.0.50.0000.00716.88
8.0.30.0120.00817.04
8.0.20.0100.00817.40
8.0.10.0000.00817.01
8.0.00.0070.01016.70
7.4.330.0030.00515.00
7.4.320.0070.00016.53
7.4.300.0000.00616.32
7.4.290.0030.00416.38
7.4.280.0000.00716.29
7.4.270.0070.00016.42
7.4.260.0000.00716.43
7.4.250.0080.00016.28
7.4.240.0050.00216.39
7.4.230.0030.00316.22
7.4.220.0170.01016.53
7.4.210.0060.00916.30
7.4.200.0030.00316.58
7.4.160.0130.00716.46
7.4.150.0130.00317.40
7.4.140.0040.01317.86
7.4.130.0070.01516.33
7.4.120.0130.00416.27
7.4.110.0080.00816.37
7.4.100.0100.00716.28
7.4.90.0060.00916.29
7.4.80.0100.01319.39
7.4.70.0100.00616.35
7.4.60.0080.00816.35
7.4.50.0000.00816.39
7.4.40.0080.01516.37
7.4.30.0100.00616.46
7.4.00.0070.00715.04
7.3.330.0030.00313.04
7.3.320.0000.00613.07
7.3.310.0000.00716.15
7.3.300.0040.00416.02
7.3.290.0030.01016.12
7.3.280.0070.01116.17
7.3.270.0100.00717.40
7.3.260.0100.00716.39
7.3.240.0100.00616.46
7.3.230.0100.00616.39
7.3.210.0100.00616.41
7.3.200.0120.01219.39
7.3.190.0060.01016.12
7.3.180.0060.01116.35
7.3.170.0030.01616.27
7.3.160.0070.01116.16
7.3.120.0070.00714.65
7.2.330.0070.01016.24
7.2.320.0030.01316.48
7.2.310.0060.01016.54
7.2.300.0090.00916.26
7.2.290.0040.01216.54
7.2.00.0070.01119.35
7.1.100.0060.00917.68
7.1.70.0060.00317.25
7.1.60.0030.01419.25
7.1.50.0070.01716.58
7.1.00.0070.07322.48
7.0.200.0000.00816.71
7.0.140.0070.07022.12
7.0.60.0100.04019.85
7.0.50.0030.05317.93
7.0.40.0100.08720.11
7.0.30.0300.07720.07
7.0.20.0270.07720.02
7.0.10.0030.04320.17
7.0.00.0030.06020.29
5.6.280.0000.07721.11
5.6.210.0030.07720.66
5.6.200.0000.06018.18
5.6.190.0170.07720.46
5.6.180.0330.05020.48
5.6.170.0230.03720.46
5.6.160.0070.03720.54
5.6.150.0030.08718.27
5.6.140.0070.03718.21
5.6.130.0100.08018.18
5.6.120.0030.04020.98
5.6.110.0200.07020.96
5.6.100.0070.05021.10
5.6.90.0070.08720.87
5.6.80.0070.08020.37
5.5.350.0100.07020.43
5.5.340.0100.08017.95
5.5.330.0070.07720.25
5.5.320.0400.04720.24
5.5.310.0300.05020.32
5.5.300.0030.08018.07
5.5.290.0030.04017.96
5.5.280.0100.07020.97
5.5.270.0070.04020.73
5.5.260.0000.09020.75
5.5.250.0030.08020.61
5.5.240.0130.03020.26
5.4.450.0170.04319.55
5.4.440.0200.04719.54
5.4.430.0130.03719.54
5.4.420.0100.04719.44
5.4.410.0030.04019.32
5.4.400.0100.03319.31
5.4.390.0170.03718.84
5.4.380.0430.05718.80
5.4.370.0330.06018.58
5.4.360.0330.06018.50
5.4.350.0370.05318.63
5.4.340.0300.05718.50
5.4.320.0080.04112.48
5.4.310.0070.04312.48
5.4.300.0060.04012.48
5.4.290.0070.03812.48
5.4.280.0030.04112.37
5.4.270.0060.03712.37
5.4.260.0070.03712.38
5.4.250.0050.03912.38
5.4.240.0040.03812.37
5.4.230.0060.04312.36
5.4.220.0040.04112.36
5.4.210.0050.03712.36
5.4.200.0100.04212.36
5.4.190.0070.03812.36
5.4.180.0100.03312.36
5.4.170.0060.04112.37
5.4.160.0100.04412.37
5.4.150.0110.04012.36
5.4.140.0110.04312.05
5.4.130.0070.03912.04
5.4.120.0090.03812.00
5.4.110.0090.04711.99
5.4.100.0110.03411.99
5.4.90.0070.03911.99
5.4.80.0100.03911.99
5.4.70.0030.03911.98
5.4.60.0060.03611.99
5.4.50.0040.03811.99
5.4.40.0020.03911.97
5.4.30.0030.05211.97
5.4.20.0040.03911.98
5.4.10.0070.03911.97
5.4.00.0090.04711.47
5.3.290.0070.03812.80
5.3.280.0100.03912.71
5.3.270.0100.04512.72
5.3.260.0070.04312.72
5.3.250.0080.03712.72
5.3.240.0080.03712.72
5.3.230.0110.03712.71
5.3.220.0060.03712.68
5.3.210.0070.03912.68
5.3.200.0080.04212.68
5.3.190.0100.04312.68
5.3.180.0060.03812.68
5.3.170.0060.04512.67
5.3.160.0060.04412.67
5.3.150.0080.04312.67
5.3.140.0150.04812.66
5.3.130.0100.05212.66
5.3.120.0090.05412.66
5.3.110.0140.04212.65
5.3.100.0100.04112.12
5.3.90.0090.04712.09
5.3.80.0100.03612.07
5.3.70.0120.03912.08
5.3.60.0130.04712.07
5.3.50.0120.05012.01
5.3.40.0070.03812.01
5.3.30.0040.04311.97
5.3.20.0100.04211.75
5.3.10.0050.04311.71
5.3.00.0080.04211.70
5.2.170.0040.0359.20
5.2.160.0080.0309.21
5.2.150.0090.0359.21
5.2.140.0090.0449.20
5.2.130.0070.0399.16
5.2.120.0080.0399.16
5.2.110.0130.0399.17
5.2.100.0100.0389.16
5.2.90.0100.0379.17
5.2.80.0110.0499.16
5.2.70.0080.0349.16
5.2.60.0100.0309.12
5.2.50.0120.0459.09
5.2.40.0120.0359.06
5.2.30.0100.0379.04
5.2.20.0040.0399.02
5.2.10.0070.0288.94
5.2.00.0060.0338.79
5.1.60.0050.0268.06
5.1.50.0070.0238.06
5.1.40.0050.0328.04
5.1.30.0120.0608.39
5.1.20.0070.0318.41
5.1.10.0050.0278.14
5.1.00.0060.0338.14
5.0.50.0060.0276.61
5.0.40.0050.0246.47
5.0.30.0080.0526.29
5.0.20.0100.0556.26
5.0.10.0040.0226.23
5.0.00.0060.0336.22
4.4.90.0050.0174.78
4.4.80.0020.0174.76
4.4.70.0050.0134.75
4.4.60.0030.0154.76
4.4.50.0030.0164.77
4.4.40.0010.0274.71
4.4.30.0050.0144.76
4.4.20.0020.0174.85
4.4.10.0040.0144.85
4.4.00.0030.0254.76
4.3.110.0030.0174.67
4.3.100.0030.0174.66
4.3.90.0040.0154.64
4.3.80.0010.0264.58
4.3.70.0000.0184.63
4.3.60.0020.0154.63
4.3.50.0030.0184.63
4.3.40.0020.0254.53
4.3.30.0010.0203.28
4.3.20.0020.0163.26
4.3.10.0010.0163.21
4.3.00.0000.02015.27

preferences:
43.49 ms | 401 KiB | 5 Q