3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = array(1,2,3,4,5,6,7,8); $originalArray = $array1; $array2 = array('a','b','c','d','e','f','g'); /* $n = count($array1); for($x = 0; $x < $n; $x++) { array_splice($array1, 1, -$x); print_r ($array1); $array1 = $originalArray; } */ $result = array_splice($array1, 3, 2, $array2); print_r ($array1); 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.3.60.0180.00016.38
8.3.50.0120.00321.92
8.3.40.0120.00618.72
8.3.30.0040.01118.92
8.3.20.0070.00020.16
8.3.10.0050.00323.64
8.3.00.0030.00619.01
8.2.180.0090.00618.05
8.2.170.0100.01022.96
8.2.160.0040.01120.41
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00422.25
8.2.110.0090.00022.27
8.2.100.0060.00617.72
8.2.90.0040.00419.23
8.2.80.0030.00617.97
8.2.70.0050.00317.63
8.2.60.0060.00317.93
8.2.50.0030.00518.07
8.2.40.0080.00018.16
8.2.30.0000.00817.86
8.2.20.0040.00417.61
8.2.10.0040.00419.87
8.2.00.0100.00017.72
8.1.280.0150.00025.92
8.1.270.0060.00323.96
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0080.00023.82
8.1.230.0120.00019.09
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0030.00717.40
8.1.180.0060.00318.88
8.1.170.0000.00918.66
8.1.160.0000.00821.88
8.1.150.0040.00418.68
8.1.140.0040.00417.41
8.1.130.0000.00717.76
8.1.120.0000.00817.29
8.1.110.0070.00417.44
8.1.100.0050.00217.28
8.1.90.0050.00217.34
8.1.80.0040.00417.38
8.1.70.0030.00317.26
8.1.60.0000.00817.44
8.1.50.0040.00417.50
8.1.40.0020.00517.38
8.1.30.0030.00717.40
8.1.20.0040.00417.49
8.1.10.0030.00517.50
8.1.00.0000.00717.34
8.0.300.0040.00420.54
8.0.290.0000.00817.05
8.0.280.0030.00318.34
8.0.270.0000.00717.32
8.0.260.0030.00317.25
8.0.250.0030.00316.90
8.0.240.0060.00016.93
8.0.230.0030.00516.93
8.0.220.0030.00316.85
8.0.210.0060.00016.82
8.0.200.0030.00316.73
8.0.190.0030.00616.82
8.0.180.0050.00316.78
8.0.170.0030.00616.76
8.0.160.0060.00316.78
8.0.150.0070.00016.71
8.0.140.0050.00316.75
8.0.130.0000.00613.27
8.0.120.0000.00716.79
8.0.110.0000.00716.80
8.0.100.0050.00316.71
8.0.90.0040.00416.82
8.0.80.0120.00316.84
8.0.70.0000.00716.68
8.0.60.0050.00216.77
8.0.50.0080.00016.72
8.0.30.0080.01217.07
8.0.20.0110.00917.40
8.0.10.0050.00316.85
8.0.00.0140.00316.75
7.4.330.0050.00015.04
7.4.320.0000.00616.49
7.4.300.0000.00616.46
7.4.290.0030.00316.44
7.4.280.0000.00716.42
7.4.270.0040.00416.47
7.4.260.0000.00716.29
7.4.250.0070.00016.31
7.4.240.0050.00216.43
7.4.230.0000.00616.48
7.4.220.0140.00416.37
7.4.210.0070.00816.53
7.4.200.0000.00816.30
7.4.190.0030.00316.27
7.4.160.0070.00716.45
7.4.150.0140.00317.40
7.4.140.0120.00417.86
7.4.130.0090.00716.60
7.4.120.0110.00516.38
7.4.110.0070.01016.61
7.4.100.0090.00916.56
7.4.90.0060.01016.36
7.4.80.0130.00319.39
7.4.70.0090.01216.52
7.4.60.0110.00616.51
7.4.50.0000.00516.23
7.4.40.0030.01022.77
7.4.30.0050.01116.24
7.4.00.0070.01015.03
7.3.330.0000.00513.09
7.3.320.0090.00012.92
7.3.310.0020.00516.14
7.3.300.0040.00416.11
7.3.290.0090.00516.16
7.3.280.0080.00616.18
7.3.270.0100.00717.40
7.3.260.0150.00316.23
7.3.250.0130.00716.27
7.3.240.0110.00616.46
7.3.230.0120.00816.39
7.3.210.0110.00616.11
7.3.200.0090.01319.39
7.3.190.0110.00616.41
7.3.180.0100.01016.18
7.3.170.0030.01216.27
7.3.160.0090.01216.43
7.3.120.0030.01515.02
7.2.330.0140.00716.60
7.2.320.0150.00316.54
7.2.310.0070.01016.72
7.2.300.0060.01016.65
7.2.290.0140.00316.66
7.2.00.0060.00619.44
7.1.100.0000.01218.09
7.1.70.0020.00516.98
7.1.60.0100.01619.46
7.1.50.0000.01216.96
7.1.00.0030.07722.57
7.0.200.0270.00314.66
7.0.140.0030.07321.95
7.0.60.0100.07020.00
7.0.50.0070.08017.86
7.0.40.0030.07320.09
7.0.30.0570.06020.19
7.0.20.0400.04720.23
7.0.10.0070.08320.15
7.0.00.0100.09020.15
5.6.280.0070.07320.76
5.6.210.0000.07320.70
5.6.200.0170.07718.29
5.6.190.0030.05320.46
5.6.180.0300.08020.41
5.6.170.0270.08020.44
5.6.160.0030.08720.50
5.6.150.0030.04318.18
5.6.140.0070.04318.27
5.6.130.0070.08718.27
5.6.120.0070.03721.00
5.6.110.0070.07020.98
5.6.100.0100.08020.88
5.6.90.0070.08020.97
5.6.80.0070.04020.36
5.5.350.0300.07020.45
5.5.340.0100.07018.05
5.5.330.0070.06020.18
5.5.320.0030.06720.35
5.5.310.0270.03020.33
5.5.300.0070.07717.95
5.5.290.0070.07717.97
5.5.280.0070.05720.87
5.5.270.0070.06720.72
5.5.260.0170.05720.88
5.5.250.0030.07320.60
5.5.240.4270.03720.34
5.4.450.0200.05719.64
5.4.440.0270.08019.52
5.4.430.0200.05019.36
5.4.420.0370.06719.54
5.4.410.0300.06319.28
5.4.400.0330.06019.22
5.4.390.0230.05718.85
5.4.380.0270.05018.85
5.4.370.0370.05019.06
5.4.360.0270.03719.06
5.4.350.0300.04719.24
5.4.340.0300.04319.15
5.4.320.0270.07019.16
5.4.310.0270.07319.08
5.4.300.0270.04019.08
5.4.290.0300.07019.21
5.4.280.0270.05019.08
5.4.270.0230.06319.24
5.4.260.0400.06318.98
5.4.250.0370.03319.23
5.4.240.0270.05719.14
5.4.230.0270.07018.98
5.4.220.0400.05018.91
5.4.210.0300.03719.20
5.4.200.0370.06719.21
5.4.190.0300.06719.14
5.4.180.0300.03719.21
5.4.170.0370.06318.98
5.4.160.0300.07019.29
5.4.150.0270.06719.07
5.4.140.0330.06716.36
5.4.130.0230.03716.50
5.4.120.0230.04016.32
5.4.110.0370.06316.35
5.4.100.0330.03316.37
5.4.90.0370.06016.41
5.4.80.0330.03716.34
5.4.70.0370.06016.41
5.4.60.0430.05016.23
5.4.50.0300.06016.53
5.4.40.0370.06016.44
5.4.30.0330.06316.48
5.4.20.0370.06016.41
5.4.10.0330.03716.24
5.4.00.0330.03315.86
5.3.290.0230.04714.66
5.3.280.0300.07014.50
5.3.270.0330.07014.62
5.3.260.0270.04014.82
5.3.250.0370.06314.52
5.3.240.0300.04014.62
5.3.230.0300.06014.61
5.3.220.0370.06314.46
5.3.210.0400.05714.46
5.3.200.0430.06014.61
5.3.190.0370.06014.79
5.3.180.0470.06014.56
5.3.170.0230.05314.46
5.3.160.0230.05314.48
5.3.150.0330.06714.46
5.3.140.0230.04014.62
5.3.130.0370.06314.76
5.3.120.0270.07314.53
5.3.110.0230.03714.63
5.3.100.0270.06014.07
5.3.90.0300.04314.25
5.3.80.0300.05013.92
5.3.70.0270.04314.15
5.3.60.0270.04313.93
5.3.50.0300.05313.85
5.3.40.0370.04714.03
5.3.30.0330.06313.95
5.3.20.0230.05013.84
5.3.10.0300.04713.73
5.3.00.0300.06713.68
5.2.170.0270.05712.82
5.2.160.0230.04712.82
5.2.150.0330.05312.82
5.2.140.0270.03012.82
5.2.130.0230.03312.82
5.2.120.0270.04712.82
5.2.110.0230.03712.82
5.2.100.0270.05712.82
5.2.90.0300.05712.82
5.2.80.0230.03712.82
5.2.70.0230.05712.82
5.2.60.0330.05012.82
5.2.50.0230.04312.82
5.2.40.0300.01712.82
5.2.30.0170.02712.82
5.2.20.0230.05312.82
5.2.10.0130.03312.82
5.2.00.0170.04312.82
5.1.60.0200.04712.82
5.1.50.0230.05012.82
5.1.40.0230.05012.82
5.1.30.0200.05312.82
5.1.20.0230.03012.82
5.1.10.0170.04312.82
5.1.00.0170.05312.82
5.0.50.0170.03712.82
5.0.40.0170.03712.82
5.0.30.0170.04712.82
5.0.20.0130.04712.82
5.0.10.0100.04712.82
5.0.00.0070.06012.82
4.4.90.0070.02012.82
4.4.80.0100.01712.82
4.4.70.0100.03012.82
4.4.60.0100.03712.82
4.4.50.0100.02712.82
4.4.40.0100.04012.82
4.4.30.0130.03312.82
4.4.20.0100.03712.82
4.4.10.0100.03712.82
4.4.00.0100.04712.82
4.3.110.0070.03312.82
4.3.100.0100.02312.82
4.3.90.0170.02712.82
4.3.80.0130.02712.82
4.3.70.0130.02312.82
4.3.60.0100.03012.82
4.3.50.0130.03312.82
4.3.40.0070.05312.82
4.3.30.0030.03312.82
4.3.20.0030.02712.82
4.3.10.0030.03012.82
4.3.00.0070.03312.82

preferences:
56.07 ms | 400 KiB | 5 Q