3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array(1 => 0, 2, 3, 4); array_splice($array, 3, count($array), array_merge(array('x'), array_slice($array, 3))); print_r($array); ?>

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.0140.00416.38
8.3.60.0140.00316.50
8.3.50.0150.00922.06
8.3.40.0070.01418.71
8.3.30.0150.00018.83
8.3.20.0090.00920.33
8.3.10.0000.00723.67
8.3.00.0000.00819.13
8.2.180.0120.00616.38
8.2.170.0080.00622.96
8.2.160.0070.00720.33
8.2.150.0090.00024.18
8.2.140.0040.00424.66
8.2.130.0030.01626.16
8.2.120.0040.00422.09
8.2.110.0070.00322.07
8.2.100.0090.00317.91
8.2.90.0000.00819.09
8.2.80.0080.00017.97
8.2.70.0030.00617.47
8.2.60.0000.00818.04
8.2.50.0080.00018.07
8.2.40.0000.00819.76
8.2.30.0000.00718.13
8.2.20.0050.00317.63
8.2.10.0040.00418.11
8.2.00.0000.01017.65
8.1.280.0110.00425.92
8.1.270.0080.00023.99
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0040.00423.99
8.1.230.0080.00319.21
8.1.220.0040.00417.74
8.1.210.0000.00918.77
8.1.200.0060.00317.35
8.1.190.0080.00017.41
8.1.180.0040.00718.10
8.1.170.0040.00418.66
8.1.160.0000.00722.00
8.1.150.0000.00718.58
8.1.140.0050.00317.43
8.1.130.0030.00317.72
8.1.120.0040.00417.37
8.1.110.0000.00717.41
8.1.100.0030.00617.34
8.1.90.0040.00417.43
8.1.80.0020.00517.43
8.1.70.0030.00317.46
8.1.60.0000.00817.61
8.1.50.0000.00917.46
8.1.40.0000.00817.52
8.1.30.0060.00317.50
8.1.20.0070.00017.63
8.1.10.0000.00817.47
8.1.00.0000.00717.43
8.0.300.0000.00718.77
8.0.290.0070.00017.04
8.0.280.0000.00718.30
8.0.270.0030.00317.23
8.0.260.0030.00317.09
8.0.250.0000.00616.87
8.0.240.0000.00816.89
8.0.230.0000.00716.74
8.0.220.0000.00716.75
8.0.210.0030.00316.86
8.0.200.0060.00016.86
8.0.190.0000.00816.88
8.0.180.0000.00816.90
8.0.170.0080.00016.88
8.0.160.0040.00416.82
8.0.150.0050.00316.73
8.0.140.0000.00716.87
8.0.130.0070.00013.28
8.0.120.0040.00416.75
8.0.110.0070.00016.70
8.0.100.0000.00716.77
8.0.90.0080.00016.89
8.0.80.0040.01116.86
8.0.70.0030.00516.84
8.0.60.0040.00416.75
8.0.50.0030.00516.91
8.0.30.0090.01417.20
8.0.20.0130.00717.40
8.0.10.0030.00516.99
8.0.00.0130.00516.60
7.4.330.0030.00315.14
7.4.320.0030.00316.45
7.4.300.0030.00316.59
7.4.290.0070.00016.63
7.4.280.0040.00416.56
7.4.270.0000.00716.49
7.4.260.0030.00316.46
7.4.250.0030.00516.60
7.4.240.0040.00316.53
7.4.230.0070.00016.57
7.4.220.0070.00716.53
7.4.210.0060.00816.61
7.4.200.0030.00316.25
7.4.190.0070.00016.41
7.4.160.0110.00816.49
7.4.150.0090.00817.40
7.4.140.0180.00217.86
7.4.130.0120.00516.54
7.4.120.0110.00816.54
7.4.110.0030.01416.26
7.4.100.0110.00716.57
7.4.90.0090.00916.61
7.4.80.0090.00919.39
7.4.70.0040.01216.54
7.4.60.0130.00416.28
7.4.50.0040.00016.43
7.4.40.0030.00922.77
7.4.30.0090.00816.51
7.4.00.0080.01014.99
7.3.330.0000.00613.12
7.3.320.0050.00012.93
7.3.310.0070.00016.26
7.3.300.0000.00716.24
7.3.290.0030.01016.18
7.3.280.0100.00716.21
7.3.270.0160.00817.40
7.3.260.0120.00616.35
7.3.250.0110.00516.25
7.3.240.0040.01216.30
7.3.230.0030.01316.39
7.3.210.0110.00616.42
7.3.200.0120.01219.39
7.3.190.0150.00616.17
7.3.180.0110.00716.20
7.3.170.0060.01116.27
7.3.160.0100.01016.28
7.3.120.0050.01114.80
7.3.110.0120.00314.64
7.3.100.0060.00614.94
7.3.90.0070.00314.42
7.3.80.0030.01014.74
7.3.70.0120.00314.57
7.3.60.0070.00714.87
7.3.50.0040.00414.57
7.3.40.0070.00714.69
7.3.30.0130.00314.80
7.3.20.0000.01216.40
7.3.10.0000.01116.63
7.3.00.0090.00616.29
7.2.330.0100.00616.38
7.2.320.0030.01716.56
7.2.310.0120.00916.50
7.2.300.0140.00716.64
7.2.290.0030.01316.27
7.2.250.0070.01015.05
7.2.240.0040.01414.82
7.2.230.0060.00614.61
7.2.220.0080.00314.80
7.2.210.0060.00314.69
7.2.200.0060.01114.90
7.2.190.0000.01314.84
7.2.180.0070.01014.96
7.2.170.0000.01314.63
7.1.330.0030.01015.69
7.1.320.0030.00915.89
7.1.310.0060.00915.89
7.1.300.0000.01515.72
7.1.290.0060.00615.64
7.1.280.0060.00915.52
7.1.270.0090.00315.88
7.1.260.0120.00415.73
7.1.70.0040.00416.80
7.1.60.0030.02119.46
7.1.50.0000.01216.80
7.1.00.0000.07722.43
7.0.200.0160.00014.78
7.0.140.0070.07022.05
7.0.60.0170.05319.91
7.0.50.0100.08317.84
7.0.40.0070.08720.30
7.0.30.0500.07020.21
7.0.20.0270.05320.07
7.0.10.0030.08720.09
7.0.00.0030.05020.33
5.6.280.0000.07721.07
5.6.210.0070.08020.46
5.6.200.0030.07318.29
5.6.190.0070.07320.67
5.6.180.0300.07720.55
5.6.170.0200.07720.54
5.6.160.0070.04020.54
5.6.150.0330.03718.12
5.6.140.0100.06018.27
5.6.130.0030.04018.18
5.6.120.0100.08321.01
5.6.110.0070.08021.13
5.6.100.0200.07020.96
5.6.90.0070.03720.98
5.6.80.0000.07720.37
5.6.70.4300.04320.55
5.5.350.0070.08320.31
5.5.340.0130.07717.98
5.5.330.0100.05020.42
5.5.320.0000.05720.35
5.5.310.0170.03720.50
5.5.300.0100.06717.95
5.5.290.0030.04018.06
5.5.280.0000.08720.87
5.5.270.0030.05720.75
5.5.260.0030.06720.64
5.5.250.0130.07320.54
5.5.240.0070.03720.34
5.4.450.0600.06319.47
5.4.440.0900.05719.47
5.4.430.1170.05719.19
5.4.420.0630.00019.51
5.4.410.0070.05718.93
5.4.400.0230.07018.89
5.4.390.0100.06018.55
5.4.380.0230.05318.76
5.4.370.0430.05018.54
5.4.360.3930.04018.55
5.4.350.0070.04012.00
5.4.340.0070.03312.00
5.4.320.0050.04312.48
5.4.310.0100.05012.47
5.4.300.0090.04012.48
5.4.290.0170.07512.46
5.4.280.0210.05812.36
5.4.270.0310.11412.36
5.4.260.0170.06912.36
5.4.250.0230.07112.36
5.4.240.0250.09712.36
5.4.230.0230.06412.35
5.4.220.0130.05312.35
5.4.210.0170.08812.35
5.4.200.0130.06712.35
5.4.190.0220.08512.34
5.4.180.0400.07012.34
5.4.170.0090.05812.36
5.4.160.0160.07512.35
5.4.150.0150.04912.35
5.4.140.0200.10212.04
5.4.130.0130.04512.02
5.4.120.0120.06911.98
5.4.110.0120.06111.97
5.4.100.0120.05111.97
5.4.90.0130.06011.98
5.4.80.0120.07411.98
5.4.70.0170.06611.97
5.4.60.0050.05911.97
5.4.50.0090.05111.97
5.4.40.0120.04711.96
5.4.30.0100.06111.96
5.4.20.0140.06211.96
5.4.10.0100.05911.96
5.4.00.0070.06711.45
5.3.290.0070.04412.80
5.3.280.0050.06912.71
5.3.270.0190.06612.72
5.3.260.0160.07112.71
5.3.250.0090.06812.72
5.3.240.0170.05012.72
5.3.230.0150.06012.71
5.3.220.0110.06512.68
5.3.210.0140.06712.68
5.3.200.0050.06312.68
5.3.190.0220.05912.68
5.3.180.0200.08012.67
5.3.170.0110.08112.67
5.3.160.0310.08812.67
5.3.150.0210.07312.68
5.3.140.0240.06512.66
5.3.130.0130.07912.66
5.3.120.0180.07812.66
5.3.110.0180.08412.66
5.3.100.0100.06812.12
5.3.90.0090.05312.09
5.3.80.0110.03812.07
5.3.70.0060.04112.08
5.3.60.0120.03512.07
5.3.50.0130.03912.01
5.3.40.0090.03812.01
5.3.30.0070.03811.97
5.3.20.0110.03611.75
5.3.10.0100.03611.71
5.3.00.0110.03911.70
5.2.170.0090.0309.20
5.2.160.0090.0299.21
5.2.150.0080.0409.21
5.2.140.0120.0489.20
5.2.130.0060.0339.16
5.2.120.0240.0469.16
5.2.110.0070.0459.17
5.2.100.0110.0359.17
5.2.90.0070.0419.16
5.2.80.0090.0519.16
5.2.70.0110.0449.16
5.2.60.0120.0579.12
5.2.50.0120.0629.08
5.2.40.0140.0589.06
5.2.30.0090.0569.04
5.2.20.0100.0349.03
5.2.10.0150.0538.94
5.2.00.0110.0548.79
5.1.60.0080.0288.08
5.1.50.0040.0378.07
5.1.40.0130.0328.05
5.1.30.0150.0518.41
5.1.20.0080.0648.42
5.1.10.0150.0828.15
5.1.00.0230.1388.15
5.0.50.0090.0366.63
5.0.40.0120.0366.48
5.0.30.0100.0636.30
5.0.20.0130.0406.27
5.0.10.0180.0656.24
5.0.00.0150.0676.23
4.4.90.0150.0554.78
4.4.80.0110.0274.76
4.4.70.0050.0224.76
4.4.60.0080.0184.75
4.4.50.0060.0234.77
4.4.40.0110.0634.70
4.4.30.0180.0304.76
4.4.20.0130.0364.84
4.4.10.0100.0484.84
4.4.00.0080.0524.76
4.3.110.0050.0364.67
4.3.100.0180.0324.66
4.3.90.0080.0654.63
4.3.80.0110.0544.58
4.3.70.0110.0434.63
4.3.60.0090.0444.63
4.3.50.0170.0354.62
4.3.40.0100.0714.53
4.3.30.0060.0483.29
4.3.20.0050.0363.27
4.3.10.0110.0443.23
4.3.00.0030.0238.14

preferences:
94.04 ms | 401 KiB | 5 Q