3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = array("red", "green", "blue", "yellow", "1", "2", "3","4"); array_splice($input, -3, 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.0120.00918.18
8.3.50.0100.00922.03
8.3.40.0110.00418.63
8.3.30.0100.00618.96
8.3.20.0070.00020.25
8.3.10.0060.00321.66
8.3.00.0000.00817.80
8.2.180.0140.00716.38
8.2.170.0130.00722.96
8.2.160.0100.00320.35
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0040.00421.04
8.2.110.0050.00520.39
8.2.100.0110.00317.59
8.2.90.0040.00419.22
8.2.80.0000.00817.97
8.2.70.0080.00017.63
8.2.60.0100.00317.66
8.2.50.0040.00418.07
8.2.40.0040.00418.09
8.2.30.0060.00317.88
8.2.20.0050.00317.57
8.2.10.0080.00017.98
8.2.00.0000.00717.67
8.1.280.0070.01325.92
8.1.270.0000.00823.96
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00323.84
8.1.230.0040.00719.11
8.1.220.0000.00817.74
8.1.210.0080.00018.77
8.1.200.0030.00617.35
8.1.190.0040.00417.09
8.1.180.0000.00718.10
8.1.170.0060.00318.57
8.1.160.0040.00421.92
8.1.150.0070.00018.84
8.1.140.0040.00417.41
8.1.130.0030.00317.72
8.1.120.0020.00517.40
8.1.110.0000.00717.43
8.1.100.0030.00517.44
8.1.90.0000.00717.24
8.1.80.0040.00417.44
8.1.70.0070.00017.40
8.1.60.0030.00617.39
8.1.50.0040.00417.40
8.1.40.0050.00317.37
8.1.30.0040.00417.54
8.1.20.0000.00717.53
8.1.10.0040.00417.40
8.1.00.0030.00517.41
8.0.300.0080.00018.77
8.0.290.0030.00516.58
8.0.280.0030.00318.40
8.0.270.0040.00417.09
8.0.260.0060.00017.09
8.0.250.0040.00416.90
8.0.240.0030.00316.83
8.0.230.0030.00316.87
8.0.220.0030.00316.72
8.0.210.0070.00016.84
8.0.200.0040.00416.74
8.0.190.0040.00416.87
8.0.180.0040.00416.76
8.0.170.0030.00616.73
8.0.160.0040.00416.66
8.0.150.0040.00416.71
8.0.140.0030.00316.69
8.0.130.0070.00013.27
8.0.120.0040.00516.69
8.0.110.0040.00416.77
8.0.100.0030.00516.80
8.0.90.0040.00416.87
8.0.80.0090.00916.75
8.0.70.0070.00016.68
8.0.60.0040.00416.81
8.0.50.0050.00216.63
8.0.30.0050.01617.01
8.0.20.0140.00517.40
8.0.10.0000.00816.81
8.0.00.0090.01416.55
7.4.330.0030.00315.00
7.4.320.0060.00016.43
7.4.300.0060.00016.34
7.4.290.0000.00716.51
7.4.280.0000.00716.45
7.4.270.0080.00016.37
7.4.260.0030.00316.43
7.4.250.0040.00416.49
7.4.240.0040.00416.43
7.4.230.0070.00016.64
7.4.220.0130.00716.61
7.4.210.0110.00416.46
7.4.200.0070.00016.50
7.4.160.0040.01216.41
7.4.150.0120.00817.40
7.4.140.0080.00817.86
7.4.130.0090.00716.39
7.4.120.0100.00816.33
7.4.110.0110.00616.39
7.4.100.0040.01416.31
7.4.90.0140.00416.47
7.4.80.0130.00619.39
7.4.70.0030.01316.43
7.4.60.0080.00816.39
7.4.50.0030.00616.57
7.4.40.0130.01016.40
7.4.30.0090.00616.34
7.4.00.0040.01115.06
7.3.330.0030.00312.93
7.3.320.0060.00012.86
7.3.310.0000.00616.17
7.3.300.0030.00316.12
7.3.290.0090.00916.12
7.3.280.0100.00716.13
7.3.270.0150.00317.40
7.3.260.0090.01316.36
7.3.250.0070.01016.23
7.3.240.0100.00616.27
7.3.230.0090.00616.39
7.3.210.0090.00916.24
7.3.200.0140.00319.39
7.3.190.0120.00416.07
7.3.180.0130.00316.04
7.3.170.0150.00416.27
7.3.160.0040.01416.27
7.3.120.0000.01414.40
7.2.330.0110.00716.48
7.2.320.0030.01316.43
7.2.310.0030.01316.42
7.2.300.0140.00316.16
7.2.290.0090.00616.34
7.2.110.0180.00316.46
7.2.00.0030.01019.29
7.1.100.0000.01018.20
7.1.70.0060.00317.15
7.1.60.0100.01319.25
7.1.50.0100.01616.57
7.1.00.0070.07322.46
7.0.200.0000.00916.75
7.0.140.0130.06321.92
7.0.60.0000.07319.96
7.0.50.0100.07717.82
7.0.40.0130.08020.23
7.0.30.0230.04720.08
7.0.20.0330.07720.16
7.0.10.0100.07720.33
7.0.00.0070.04320.23
5.6.280.0000.07020.86
5.6.210.0100.07320.75
5.6.200.0030.05718.18
5.6.190.0030.04320.52
5.6.180.0230.04320.58
5.6.170.0270.03320.46
5.6.160.0070.08020.44
5.6.150.0030.04318.21
5.6.140.0070.07318.11
5.6.130.0200.06018.15
5.6.120.0070.04321.11
5.6.110.0100.08020.97
5.6.100.0030.04021.10
5.6.90.0030.04020.84
5.6.80.0070.03720.42
5.5.350.0000.03320.39
5.5.340.0170.03318.08
5.5.330.0130.08020.21
5.5.320.0200.04320.37
5.5.310.0300.05720.23
5.5.300.0100.08017.98
5.5.290.0030.04018.08
5.5.280.0070.08320.95
5.5.270.0170.07320.85
5.5.260.0030.04020.85
5.5.250.0130.05720.56
5.5.240.0100.05020.06
5.4.450.0170.04319.34
5.4.440.0130.04719.54
5.4.430.0100.04319.52
5.4.420.0030.03719.38
5.4.410.0030.03719.34
5.4.400.0170.03018.98
5.4.390.0130.03718.99
5.4.380.0430.04718.50
5.4.370.0270.05318.70
5.4.360.0170.06318.52
5.4.350.0230.06018.80
5.4.340.0330.05318.50
5.4.320.0050.03812.48
5.4.310.0050.04012.47
5.4.300.0070.04012.48
5.4.290.0050.03812.48
5.4.280.0060.03712.37
5.4.270.0080.04012.38
5.4.260.0090.04912.38
5.4.250.0080.03812.38
5.4.240.0090.03412.37
5.4.230.0070.03812.36
5.4.220.0060.03512.36
5.4.210.0080.03412.36
5.4.200.0100.03412.36
5.4.190.0080.03412.36
5.4.180.0060.03712.36
5.4.170.0060.03612.38
5.4.160.0030.03912.37
5.4.150.0030.03912.37
5.4.140.0060.03812.05
5.4.130.0040.03812.04
5.4.120.0050.03712.00
5.4.110.0070.03412.00
5.4.100.0060.03611.99
5.4.90.0060.03711.99
5.4.80.0040.03911.99
5.4.70.0090.03211.98
5.4.60.0030.03811.98
5.4.50.0060.04011.98
5.4.40.0070.03911.98
5.4.30.0060.03511.98
5.4.20.0070.03511.98
5.4.10.0090.03211.97
5.4.00.0070.04111.47
5.3.290.0120.03612.80
5.3.280.0070.03912.71
5.3.270.0060.03812.73
5.3.260.0060.03912.72
5.3.250.0090.05112.72
5.3.240.0120.05012.72
5.3.230.0100.04012.71
5.3.220.0070.04212.68
5.3.210.0070.04112.68
5.3.200.0070.03412.68
5.3.190.0070.04312.68
5.3.180.0060.03812.68
5.3.170.0090.03412.67
5.3.160.0040.03912.68
5.3.150.0040.03912.67
5.3.140.0070.03812.66
5.3.130.0070.04012.66
5.3.120.0040.04112.66
5.3.110.0060.04012.66
5.3.100.0050.03812.12
5.3.90.0060.03612.09
5.3.80.0060.03612.08
5.3.70.0090.03312.07
5.3.60.0070.03512.07
5.3.50.0020.04012.01
5.3.40.0070.03412.01
5.3.30.0080.03611.97
5.3.20.0090.03211.75
5.3.10.0070.03311.71
5.3.00.0060.03611.70
5.2.170.0040.0309.20
5.2.160.0050.0299.20
5.2.150.0020.0339.20
5.2.140.0050.0309.20
5.2.130.0050.0339.16
5.2.120.0050.0299.16
5.2.110.0050.0289.17
5.2.100.0040.0299.16
5.2.90.0030.0309.16
5.2.80.0090.0309.16
5.2.70.0030.0389.16
5.2.60.0060.0299.12
5.2.50.0090.0269.08
5.2.40.0050.0289.06
5.2.30.0030.0319.04
5.2.20.0050.0289.02
5.2.10.0040.0288.93
5.2.00.0050.0288.79
5.1.60.0030.0258.06
5.1.50.0050.0238.06
5.1.40.0050.0318.04
5.1.30.0050.0268.39
5.1.20.0050.0268.41
5.1.10.0060.0268.14
5.1.00.0060.0258.14
5.0.50.0090.0156.61
5.0.40.0040.0196.47
5.0.30.0010.0346.29
5.0.20.0050.0186.26
5.0.10.0040.0196.24
5.0.00.0010.0336.23
4.4.90.0020.0184.78
4.4.80.0030.0174.76
4.4.70.0050.0154.75
4.4.60.0040.0184.75
4.4.50.0040.0144.77
4.4.40.0050.0294.70
4.4.30.0020.0164.76
4.4.20.0040.0194.84
4.4.10.0040.0144.85
4.4.00.0020.0254.76
4.3.110.0050.0134.67
4.3.100.0010.0164.66
4.3.90.0020.0154.64
4.3.80.0030.0244.59
4.3.70.0020.0154.63
4.3.60.0060.0144.63
4.3.50.0040.0144.63
4.3.40.0040.0254.54
4.3.30.0020.0173.28
4.3.20.0020.0163.26
4.3.10.0030.0153.22
4.3.00.0000.01315.27

preferences:
89.6 ms | 401 KiB | 5 Q