3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = array("a", "b", "c", "d", "e"); $output = array_slice($input, 2); // returns "c", "d", and "e" $output = array_slice($input, -2, 1); // returns "d" $output = array_slice($input, 0, 3); // returns "a", "b", and "c" // note the differences in the array keys print_r(array_slice($input,0));

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.40.0140.00418.41
8.3.30.0040.01119.04
8.3.20.0070.00020.16
8.3.10.0030.00522.05
8.3.00.0050.00322.39
8.2.170.0000.01422.96
8.2.160.0110.00319.04
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0090.01226.16
8.2.120.0060.00317.63
8.2.110.0090.00022.08
8.2.100.0130.00317.72
8.2.90.0040.00419.22
8.2.80.0030.00617.97
8.2.70.0050.00317.47
8.2.60.0080.00018.04
8.2.50.0060.00318.07
8.2.40.0050.00318.09
8.2.30.0070.00017.92
8.2.20.0050.00217.60
8.2.10.0020.00517.55
8.2.00.0070.00317.78
8.1.270.0070.00322.07
8.1.260.0040.00426.35
8.1.250.0110.00728.09
8.1.240.0100.00023.96
8.1.230.0060.00619.16
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0040.00417.43
8.1.180.0000.00718.61
8.1.170.0090.00018.53
8.1.160.0040.00422.13
8.1.150.0040.00418.50
8.1.140.0040.00417.38
8.1.130.0040.00417.83
8.1.120.0040.00417.27
8.1.110.0040.00417.34
8.1.100.0030.00317.30
8.1.90.0040.00417.45
8.1.80.0030.00317.29
8.1.70.0000.00717.33
8.1.60.0030.00617.45
8.1.50.0050.00317.38
8.1.40.0080.00017.34
8.1.30.0040.00417.54
8.1.20.0000.00917.43
8.1.10.0000.00717.46
8.1.00.0050.00217.40
8.0.300.0000.00718.77
8.0.290.0040.00417.05
8.0.280.0000.00718.42
8.0.270.0030.00517.10
8.0.260.0000.00716.75
8.0.250.0070.00016.78
8.0.240.0030.00716.80
8.0.230.0030.00316.88
8.0.220.0000.00716.82
8.0.210.0000.00716.85
8.0.200.0000.00716.93
8.0.190.0030.00316.89
8.0.180.0040.00416.76
8.0.170.0080.00016.85
8.0.160.0000.00716.79
8.0.150.0040.00416.81
8.0.140.0000.00916.75
8.0.130.0000.00613.21
8.0.120.0080.00016.81
8.0.110.0080.00016.64
8.0.100.0050.00216.93
8.0.90.0000.00716.82
8.0.80.0060.00916.74
8.0.70.0040.00416.71
8.0.60.0000.00716.81
8.0.50.0000.00916.70
8.0.30.0100.00916.99
8.0.20.0140.00517.40
8.0.10.0030.00516.75
8.0.00.0110.01116.69
7.4.330.0050.00015.00
7.4.320.0000.00616.44
7.4.300.0000.00616.44
7.4.290.0000.00716.51
7.4.280.0000.00716.44
7.4.270.0030.00316.52
7.4.260.0030.00316.43
7.4.250.0080.00016.52
7.4.240.0050.00216.49
7.4.230.0040.00416.34
7.4.220.0060.01516.38
7.4.210.0060.00716.53
7.4.200.0030.00316.43
7.4.190.0040.00416.67
7.4.160.0090.00916.36
7.4.150.0060.01117.40
7.4.140.0050.01317.86
7.4.130.0050.01116.47
7.4.120.0110.00616.35
7.4.110.0150.00916.59
7.4.100.0140.00316.46
7.4.90.0110.00616.38
7.4.80.0100.01319.39
7.4.70.0060.01516.51
7.4.60.0120.00616.53
7.4.50.0050.00316.44
7.4.40.0050.00822.77
7.4.30.0150.00016.55
7.4.10.0100.01015.13
7.4.00.0090.00614.91
7.3.330.0000.00512.86
7.3.320.0020.00212.92
7.3.310.0040.00415.98
7.3.300.0040.00416.14
7.3.290.0080.00616.09
7.3.280.0050.00916.14
7.3.270.0100.00717.40
7.3.260.0030.01316.16
7.3.250.0080.01516.13
7.3.240.0030.01316.32
7.3.230.0040.01516.39
7.3.210.0100.01316.13
7.3.200.0110.00616.42
7.3.190.0120.00916.43
7.3.180.0170.00016.43
7.3.170.0060.00916.54
7.3.160.0090.00616.19
7.3.130.0090.00914.90
7.3.120.0050.01114.54
7.3.110.0040.00814.89
7.3.100.0030.00914.86
7.3.90.0000.01614.74
7.3.80.0070.00714.88
7.3.70.0000.01014.82
7.3.60.0000.01214.77
7.3.50.0000.01214.62
7.3.40.0060.00914.68
7.3.30.0040.00814.50
7.3.20.0090.00616.66
7.3.10.0080.00616.10
7.3.00.0060.00816.12
7.2.330.0030.01416.51
7.2.320.0150.00616.54
7.2.310.0030.01916.60
7.2.300.0160.00016.18
7.2.290.0130.00316.22
7.2.260.0110.00714.88
7.2.250.0060.01314.84
7.2.240.0110.00715.00
7.2.230.0040.01115.03
7.2.220.0000.01214.83
7.2.210.0030.01215.07
7.2.200.0030.01015.04
7.2.190.0100.00715.04
7.2.180.0080.00414.91
7.2.170.0060.01214.84
7.2.160.0110.00315.07
7.2.150.0070.00716.95
7.2.140.0060.01216.51
7.2.130.0090.00916.69
7.2.120.0120.00516.47
7.2.110.0070.01016.62
7.2.100.0050.01616.52
7.2.90.0080.01016.58
7.2.80.0160.00416.51
7.2.70.0040.01116.70
7.2.60.0060.00916.44
7.2.50.0110.00716.67
7.2.40.0060.00816.51
7.2.30.0100.00516.65
7.2.20.0120.00616.33
7.2.10.0050.01116.57
7.2.00.0140.00616.66
7.1.330.0000.01315.76
7.1.320.0070.00315.72
7.1.310.0060.00615.75
7.1.300.0070.00715.69
7.1.290.0030.01015.89
7.1.280.0070.00315.67
7.1.270.0050.00315.95
7.1.260.0000.00815.44
7.1.250.0060.01115.30
7.1.240.0000.01515.73
7.1.230.0060.00615.59
7.1.220.0070.00715.43
7.1.210.0040.01215.64
7.1.200.0000.01715.60
7.1.190.0120.00015.72
7.1.180.0070.00315.54
7.1.170.0080.00415.75
7.1.160.0090.00315.81
7.1.150.0040.01115.90
7.1.140.0000.01215.67
7.1.130.0130.00015.61
7.1.120.0060.00615.69
7.1.110.0070.00315.67
7.1.100.0050.00816.77
7.1.90.0030.01215.66
7.1.80.0030.00915.75
7.1.70.0030.00816.36
7.1.60.0110.00817.65
7.1.50.0080.01116.43
7.1.40.0030.00715.91
7.1.30.0070.00715.55
7.1.20.0050.00315.76
7.1.10.0000.01415.66
7.1.00.0050.02019.14
7.0.330.0040.01115.31
7.0.320.0070.00715.50
7.0.310.0070.00715.39
7.0.300.0030.00715.46
7.0.290.0060.00915.31
7.0.280.0000.00815.31
7.0.270.0100.00315.52
7.0.260.0060.00315.24
7.0.250.0120.00015.39
7.0.240.0030.00915.12
7.0.230.0030.00615.30
7.0.220.0100.00615.32
7.0.210.0030.01015.53
7.0.200.0050.00715.98
7.0.190.0030.01015.09
7.0.180.0080.00415.38
7.0.170.0080.00315.29
7.0.160.0060.00315.25
7.0.150.0040.00815.31
7.0.140.0040.04218.67
7.0.130.0000.01315.43
7.0.120.0030.01015.17
7.0.110.0070.01015.48
7.0.100.0070.01015.21
7.0.90.0040.00815.44
7.0.80.0100.00015.44
7.0.70.0070.00715.54
7.0.60.0070.04217.69
7.0.50.0020.03416.70
7.0.40.0020.03016.75
7.0.30.0190.04216.95
7.0.20.0150.03916.84
7.0.10.0150.03116.80
7.0.00.0050.04216.71
5.6.400.0060.01014.58
5.6.390.0090.00914.25
5.6.380.0030.01214.39
5.6.370.0070.01014.02
5.6.360.0070.00714.20
5.6.350.0080.00814.30
5.6.340.0100.00014.09
5.6.330.0070.00314.41
5.6.320.0120.00314.38
5.6.310.0090.00614.46
5.6.300.0060.01314.14
5.6.290.0120.00614.06
5.6.280.0030.04117.43
5.6.270.0090.00914.16
5.6.260.0090.00614.57
5.6.250.0120.00014.39
5.6.240.0030.00814.04
5.6.230.0070.00714.25
5.6.220.0030.01014.35
5.6.210.0100.04317.43
5.6.200.0070.04316.13
5.6.190.0030.04617.46
5.6.180.1730.02417.50
5.6.170.0180.03017.48
5.6.160.0080.02517.29
5.6.150.0070.04516.15
5.6.140.0080.02316.23
5.6.130.0050.04916.17
5.6.120.0070.02517.53
5.6.110.0030.05217.62
5.6.100.0100.03617.55
5.6.90.0070.04117.43
5.6.80.0110.04017.31
5.6.70.0180.03317.21
5.6.60.0000.00813.86
5.6.50.0090.00614.43
5.6.40.0060.00914.13
5.6.30.0030.01414.43
5.6.20.0100.00314.20
5.6.10.0030.00914.27
5.6.00.0030.00914.11
5.5.380.0030.01413.90
5.5.370.0060.00613.88
5.5.360.0000.00813.98
5.5.350.0050.04317.42
5.5.340.0070.04315.98
5.5.330.0020.04817.15
5.5.320.0140.02717.20
5.5.310.0120.02917.17
5.5.300.0030.02715.93
5.5.290.0050.02916.09
5.5.280.0100.04417.34
5.5.270.0030.02717.37
5.5.260.0070.03317.53
5.5.250.0050.04517.39
5.5.240.0090.04117.16
5.5.230.0120.00014.02
5.5.220.0060.00613.97
5.5.210.0070.00713.98
5.5.200.0130.00713.83
5.5.190.0040.00814.16
5.5.180.0080.00614.18
5.5.170.0030.00713.96
5.5.160.0040.01114.21
5.5.150.0090.00314.13
5.5.140.0000.01314.09
5.5.130.0000.01414.27
5.5.120.0110.00314.24
5.5.110.0070.01114.21
5.5.100.0040.00814.18
5.5.90.0030.00914.21
5.5.80.0090.00314.19
5.5.70.0070.00713.70
5.5.60.0110.00413.91
5.5.50.0080.00613.90
5.5.40.0110.00314.22
5.5.30.0000.01813.96
5.5.20.0060.00314.22
5.5.10.0110.00614.32
5.5.00.0070.00714.11
5.4.450.0400.03015.64
5.4.440.0230.04115.61
5.4.430.0390.03315.61
5.4.420.0430.04215.61
5.4.410.0030.03515.37
5.4.400.0170.03015.09
5.4.390.0230.03315.07
5.4.380.0120.03215.17
5.4.370.0230.03115.08
5.4.360.0150.03015.20
5.4.350.0130.03215.21
5.4.340.0140.02815.09
5.4.330.0040.00411.68
5.4.320.0060.02112.08
5.4.310.0060.02712.08
5.4.300.0060.02112.08
5.4.290.0050.02112.08
5.4.280.0070.02712.03
5.4.270.0070.02112.03
5.4.260.0100.02815.16
5.4.250.0050.03415.25
5.4.240.0050.03015.16
5.4.230.0120.02815.28
5.4.220.0080.02815.25
5.4.210.0050.03015.16
5.4.200.0050.03015.22
5.4.190.0110.03515.30
5.4.180.0090.02615.23
5.4.170.0070.03015.23
5.4.160.0120.03215.16
5.4.150.0080.03915.16
5.4.140.0080.03514.13
5.4.130.0080.02814.14
5.4.120.0070.04214.02
5.4.110.0050.03314.09
5.4.100.0090.02714.07
5.4.90.0020.03014.02
5.4.80.0150.03014.16
5.4.70.0050.02814.07
5.4.60.0150.02914.11
5.4.50.0100.03214.03
5.4.40.0070.03914.10
5.4.30.0050.02914.07
5.4.20.0070.03714.10
5.4.10.0080.03014.02
5.4.00.0030.03813.83
5.3.290.0040.02812.24
5.3.280.0100.02313.17
5.3.270.0130.02313.25
5.3.260.0080.03013.13
5.3.250.0100.03013.18
5.3.240.0030.04413.18
5.3.230.0080.03713.22
5.3.220.0060.02813.13
5.3.210.0040.04313.11
5.3.200.0030.03113.10
5.3.190.0050.03013.21
5.3.180.0100.02513.16
5.3.170.0040.04213.12
5.3.160.0050.03013.16
5.3.150.0070.03213.03
5.3.140.0050.03113.15
5.3.130.0060.03013.22
5.3.120.0050.04313.15
5.3.110.0070.04313.20
5.3.100.0070.04012.89
5.3.90.0050.02912.76
5.3.80.0120.03312.89
5.3.70.0050.02812.89
5.3.60.0030.03812.83
5.3.50.0100.03212.84
5.3.40.0070.03512.79
5.3.30.0070.03012.80
5.3.20.0100.02312.72
5.3.10.0050.02712.57
5.3.00.0090.03612.75
5.2.170.0100.05011.11
5.2.160.0130.04311.04
5.2.150.0100.05011.21
5.2.140.0030.05011.31
5.2.130.0070.04311.31
5.2.120.0130.04711.17
5.2.110.0100.04010.99
5.2.100.0070.04311.06
5.2.90.0100.05311.31
5.2.80.0100.04011.17
5.2.70.0100.05711.04
5.2.60.0030.05011.13
5.2.50.0070.04011.17
5.2.40.0100.04710.98
5.2.30.0030.06011.05
5.2.20.0070.04010.94
5.2.10.0070.04010.93
5.2.00.0030.04310.79
5.1.60.0130.0339.93
5.1.50.0130.0409.88
5.1.40.0070.04710.13
5.1.30.0070.03710.34
5.1.20.0030.03710.33
5.1.10.0130.03310.30
5.1.00.0130.03310.09
5.0.50.0030.0438.46
5.0.40.0030.0408.45
5.0.30.0070.0578.27
5.0.20.0030.0308.23
5.0.10.0030.0308.25
5.0.00.0100.0478.25
4.4.90.0000.0237.45
4.4.80.0070.0177.45
4.4.70.0000.0337.45
4.4.60.0000.0237.45
4.4.50.0030.0307.45
4.4.40.0000.0407.45
4.4.30.0000.0337.45
4.4.20.0100.0237.45
4.4.10.0030.0237.45
4.4.00.0000.0377.45
4.3.110.0100.0137.45
4.3.100.0070.0177.45
4.3.90.0070.0237.45
4.3.80.0200.0307.45
4.3.70.0030.0307.45
4.3.60.0070.0237.45
4.3.50.0100.0237.45
4.3.40.0030.0307.45
4.3.30.0030.0207.45
4.3.20.0030.0207.45
4.3.10.0030.0337.45
4.3.00.0000.0236.86

preferences:
50.19 ms | 400 KiB | 5 Q