3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = array("a"=>1, "b"=>2, "c"=>3, "d"=>4, "e"=>5); print_r(array_slice($input, -1, 1, true));

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.0110.00716.38
8.3.50.0110.00717.15
8.3.40.0070.00718.67
8.3.30.0110.00718.65
8.3.20.0040.00418.43
8.3.10.0080.00020.36
8.3.00.0000.00819.13
8.2.180.0100.01016.50
8.2.170.0070.00722.96
8.2.160.0040.01121.09
8.2.150.0080.00025.66
8.2.140.0060.00324.66
8.2.130.0000.00826.16
8.2.120.0070.00720.82
8.2.110.0060.00320.35
8.2.100.0040.00817.72
8.2.90.0040.00419.05
8.2.80.0030.00517.97
8.2.70.0050.00317.50
8.2.60.0040.00417.92
8.2.50.0030.00618.10
8.2.40.0030.00620.46
8.2.30.0040.00417.95
8.2.20.0000.00817.58
8.2.10.0080.00017.54
8.2.00.0000.00917.52
8.1.280.0070.01125.92
8.1.270.0080.00024.66
8.1.260.0080.00026.35
8.1.250.0100.00728.09
8.1.240.0060.00322.77
8.1.230.0040.00817.83
8.1.220.0060.00317.74
8.1.210.0080.00018.77
8.1.200.0030.00617.23
8.1.190.0000.00817.10
8.1.180.0040.00418.10
8.1.170.0060.00318.43
8.1.160.0030.00618.82
8.1.150.0040.00418.58
8.1.140.0070.00017.38
8.1.130.0030.00317.81
8.1.120.0000.00817.43
8.1.110.0040.00417.27
8.1.100.0000.00717.30
8.1.90.0070.00017.38
8.1.80.0040.00417.41
8.1.70.0040.00417.41
8.1.60.0030.00517.35
8.1.50.0050.00317.30
8.1.40.0040.00417.48
8.1.30.0030.00517.63
8.1.20.0000.00917.47
8.1.10.0040.00417.31
8.1.00.0040.00417.25
8.0.300.0030.00618.77
8.0.290.0040.00416.63
8.0.280.0070.00018.37
8.0.270.0080.00017.17
8.0.260.0040.00416.76
8.0.250.0060.00316.80
8.0.240.0070.00016.86
8.0.230.0030.00316.79
8.0.220.0040.00416.84
8.0.210.0020.00516.77
8.0.200.0060.00016.71
8.0.190.0040.00416.90
8.0.180.0060.00616.76
8.0.170.0060.00316.79
8.0.160.0000.00716.71
8.0.150.0060.00316.83
8.0.140.0030.00616.81
8.0.130.0030.00313.24
8.0.120.0040.00316.73
8.0.110.0060.00316.85
8.0.100.0030.00516.88
8.0.90.0070.00016.93
8.0.80.0070.00716.86
8.0.70.0000.00716.88
8.0.60.0040.00416.85
8.0.50.0040.00416.81
8.0.30.0080.01116.93
8.0.20.0150.00616.84
8.0.10.0000.00716.83
8.0.00.0120.01016.75
7.4.330.0000.00512.85
7.4.320.0000.00716.54
7.4.300.0030.00516.41
7.4.290.0030.00316.54
7.4.280.0040.00416.42
7.4.270.0000.00616.45
7.4.260.0000.00613.21
7.4.250.0000.00716.43
7.4.240.0030.00316.43
7.4.230.0030.00316.62
7.4.220.0080.01016.53
7.4.210.0090.00816.56
7.4.200.0070.00016.36
7.4.190.0040.00416.61
7.4.160.0030.01616.30
7.4.150.0100.01016.12
7.4.140.0110.00516.48
7.4.130.0080.00816.21
7.4.120.0080.00816.38
7.4.110.0060.00916.45
7.4.100.0180.00316.24
7.4.90.0070.01616.44
7.4.80.0060.01419.39
7.4.70.0090.00916.46
7.4.60.0090.00616.54
7.4.50.0000.01216.30
7.4.40.0150.00316.42
7.4.30.0060.00916.36
7.4.00.0000.00814.72
7.3.330.0060.00012.86
7.3.320.0060.00012.86
7.3.310.0030.00315.89
7.3.300.0000.00716.12
7.3.290.0090.00916.16
7.3.280.0080.00816.14
7.3.270.0110.00716.13
7.3.260.0120.00616.14
7.3.250.0140.00816.26
7.3.240.0130.00416.09
7.3.230.0120.00416.06
7.3.210.0150.00416.23
7.3.200.0130.00416.06
7.3.190.0090.00916.26
7.3.180.0100.00616.43
7.3.170.0040.01216.08
7.3.160.0130.00616.18
7.3.120.0030.01514.84
7.2.330.0090.00916.46
7.2.320.0120.00616.57
7.2.310.0140.01016.44
7.2.300.0060.01216.52
7.2.290.0130.00616.45
7.2.00.0030.01219.40
7.1.100.0030.00918.19
7.1.70.0000.00716.81
7.1.60.0090.01519.40
7.1.50.0070.01416.98
7.1.00.0030.08022.40
7.0.200.0030.00316.57
7.0.140.0130.06322.21
7.0.120.0030.07322.05
7.0.60.0070.04020.04
7.0.50.0100.05717.80
7.0.40.0130.07720.04
7.0.30.0030.04320.12
7.0.20.0100.04720.23
7.0.10.0100.03720.07
7.0.00.0030.04319.95
5.6.280.0000.07721.03
5.6.210.0100.07720.50
5.6.200.0130.04718.17
5.6.190.0130.08320.40
5.6.180.0030.04720.35
5.6.170.0070.04020.55
5.6.160.0070.04020.48
5.6.150.0100.03320.36
5.6.140.0030.05020.37
5.6.130.0030.04320.18
5.6.120.0100.04720.10
5.6.110.0000.04720.16
5.6.100.0130.03320.32
5.6.90.0000.04720.08
5.6.80.0070.03719.79
5.6.70.0030.04019.69
5.6.60.0030.04019.69
5.6.50.0030.04319.81
5.6.40.0030.04319.70
5.6.30.0000.04319.79
5.6.20.0030.04719.72
5.6.10.0030.04019.46
5.6.00.0070.05019.63
5.5.350.0330.06320.46
5.5.340.0130.07717.91
5.5.330.0030.05320.46
5.5.320.0100.04020.42
5.5.310.0070.04020.43
5.5.300.0070.03720.20
5.5.290.0030.04020.12
5.5.280.0030.07320.14
5.5.270.0030.04320.12
5.5.260.0100.03720.22
5.5.250.0070.03720.02
5.5.240.0000.04319.31
5.5.230.0100.03319.63
5.5.220.0030.04019.58
5.5.210.0070.03719.35
5.5.200.0030.03719.52
5.5.190.0100.03319.56
5.5.180.0070.03719.29
5.5.160.0030.04019.52
5.5.150.0100.03719.60
5.5.140.0070.05719.25
5.5.130.0030.08319.31
5.5.120.0030.08019.32
5.5.110.0030.04019.54
5.5.100.0030.08719.51
5.5.90.0000.09319.23
5.5.80.0070.07019.21
5.5.70.0070.04319.45
5.5.60.0030.07019.16
5.5.50.0030.09019.43
5.5.40.0030.08019.21
5.5.30.0030.08319.46
5.5.20.0030.05319.46
5.5.10.0000.05019.45
5.5.00.0070.04019.13
5.4.450.0100.03319.45
5.4.440.0070.04719.32
5.4.430.0000.05319.24
5.4.420.0100.03319.50
5.4.410.0100.03019.27
5.4.400.0070.03319.15
5.4.390.0000.04019.00
5.4.380.0000.04318.80
5.4.370.0030.03719.01
5.4.360.0100.03319.08
5.4.350.0100.03019.12
5.4.340.0000.04018.78
5.4.320.0100.03019.00
5.4.310.0000.04019.18
5.4.300.0170.06319.09
5.4.290.0030.08019.18
5.4.280.0000.05718.80
5.4.270.0000.04019.17
5.4.260.0130.07719.00
5.4.250.0030.07018.91
5.4.240.0130.05018.90
5.4.230.0100.03319.13
5.4.220.0030.05719.14
5.4.210.0070.06719.08
5.4.200.0130.06719.17
5.4.190.0170.07019.17
5.4.180.0000.04319.16
5.4.170.0070.05318.77
5.4.160.0100.07318.98
5.4.150.0170.07019.11
5.4.140.0070.05716.25
5.4.130.0070.03716.16
5.4.120.0030.08716.23
5.4.110.0000.04316.44
5.4.100.0030.06016.28
5.4.90.0030.05316.41
5.4.80.0130.03316.24
5.4.70.0100.04716.38
5.4.60.0000.04016.21
5.4.50.0100.07016.24
5.4.40.0070.07316.36
5.4.30.0030.06016.63
5.4.20.0070.04016.23
5.4.10.0130.08016.25
5.4.00.0070.04715.80
5.3.290.0070.03714.63
5.3.280.0070.07714.57
5.3.270.0070.07714.53
5.3.260.0100.07714.42
5.3.250.0030.07714.54
5.3.240.0100.03314.69
5.3.230.0070.06314.52
5.3.220.0070.06314.54
5.3.210.0130.06314.53
5.3.200.0030.06314.48
5.3.190.0070.03714.51
5.3.180.0000.04714.38
5.3.170.0100.07014.57
5.3.160.0030.06314.49
5.3.150.0030.04714.38
5.3.140.0100.04314.45
5.3.130.0030.05314.46
5.3.120.0030.04314.50
5.3.110.0030.07714.44
5.3.100.0030.05313.96
5.3.90.0070.05013.81
5.3.80.0030.07313.84
5.3.70.0100.07013.94
5.3.60.0070.05313.95
5.3.50.0030.05314.04
5.3.40.0000.05013.76
5.3.30.0070.07713.89
5.3.20.0100.04013.63
5.3.10.0070.03313.62
5.3.00.0070.04713.59
5.2.170.0030.03011.23
5.2.160.0070.02711.02
5.2.150.0070.03011.02
5.2.140.0030.06011.13
5.2.130.0100.03311.03
5.2.120.0070.03311.05
5.2.110.0100.03010.95
5.2.100.0030.04311.09
5.2.90.0030.03711.09
5.2.80.0030.03711.06
5.2.70.0130.05310.91
5.2.60.0030.06311.00
5.2.50.0030.04011.00
5.2.40.0000.07010.89
5.2.30.0130.05010.90
5.2.20.0070.05710.94
5.2.10.0070.05010.86
5.2.00.0000.05310.71
5.1.60.0070.0279.98
5.1.50.0070.0439.89
5.1.40.0070.0539.90
5.1.30.0030.04310.37
5.1.20.0000.03310.41
5.1.10.0100.02710.13
5.1.00.0030.03010.01
5.0.50.0030.0308.56
5.0.40.0070.0208.46
5.0.30.0030.0578.20
5.0.20.0030.0238.16
5.0.10.0030.0408.30
5.0.00.0030.0408.10
4.4.90.0000.0176.76
4.4.80.0000.0376.76
4.4.70.0070.0336.76
4.4.60.0030.0376.76
4.4.50.0070.0336.76
4.4.40.0000.0576.76
4.4.30.0000.0406.76
4.4.20.0070.0176.76
4.4.10.0070.0276.76
4.4.00.0030.0336.76
4.3.110.0000.0336.76
4.3.100.0030.0236.76
4.3.90.0070.0336.76
4.3.80.0000.0436.76
4.3.70.0000.0176.76
4.3.60.0070.0136.76
4.3.50.0000.0176.76
4.3.40.0100.0176.76
4.3.30.0030.0136.76
4.3.20.0000.0176.76
4.3.10.0030.0176.76
4.3.00.0000.0176.76

preferences:
40.71 ms | 400 KiB | 5 Q