3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); echo "Testing case 1\n"; foreach ($array as $key => $value) { unset($aarray[$kkey+1]); echo sprintf("on %s, we removed %s\n, current size is %d", $key, $key+1, count($array)); } echo "Testing case 2\n"; foreach ((array) $array as $key => $value) { unset($aarray[$key+1]); echo sprintf("on %s, we removed %s\n, current size is %d", $key, $key+1, count($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.40.0150.00318.79
8.3.30.0110.00319.17
8.3.20.0070.00020.16
8.3.10.0050.00321.73
8.3.00.0040.00419.68
8.2.170.0140.00722.96
8.2.160.0150.00020.34
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0080.00026.16
8.2.120.0000.00919.38
8.2.110.0030.00619.20
8.2.100.0060.00617.84
8.2.90.0040.00419.28
8.2.80.0040.00419.37
8.2.70.0040.00417.75
8.2.60.0000.00818.04
8.2.50.0040.00418.07
8.2.40.0000.00918.16
8.2.30.0040.00419.44
8.2.20.0030.00517.79
8.2.10.0040.00418.19
8.2.00.0000.00717.87
8.1.270.0050.00322.18
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0060.00322.39
8.1.230.0110.00020.91
8.1.220.0040.00417.74
8.1.210.0000.00820.23
8.1.200.0040.00417.35
8.1.190.0040.00417.28
8.1.180.0030.00618.88
8.1.170.0080.00018.71
8.1.160.0030.00518.79
8.1.150.0040.00418.91
8.1.140.0040.00417.46
8.1.130.0040.00417.77
8.1.120.0070.00017.39
8.1.110.0040.00417.45
8.1.100.0050.00217.47
8.1.90.0040.00417.41
8.1.80.0050.00217.39
8.1.70.0070.00017.39
8.1.60.0030.00517.61
8.1.50.0050.00317.51
8.1.40.0080.00417.45
8.1.30.0050.00317.56
8.1.20.0030.00517.64
8.1.10.0000.00817.52
8.1.00.0040.00417.46
8.0.300.0100.00019.94
8.0.290.0050.00217.05
8.0.280.0030.00318.44
8.0.270.0000.00717.26
8.0.260.0000.00617.17
8.0.250.0030.00317.06
8.0.240.0030.00317.03
8.0.230.0070.00016.98
8.0.220.0030.00616.96
8.0.210.0070.00016.95
8.0.200.0000.00717.06
8.0.190.0060.00617.02
8.0.180.0000.00716.99
8.0.170.0040.00416.84
8.0.160.0080.00017.05
8.0.150.0080.00016.76
8.0.140.0070.00016.87
8.0.130.0000.00513.36
8.0.120.0040.00416.96
8.0.110.0070.00016.88
8.0.100.0040.00416.79
8.0.90.0080.00016.84
8.0.80.0000.01916.94
8.0.70.0070.00017.02
8.0.60.0040.00417.03
8.0.50.0000.00716.74
8.0.30.0130.00817.07
8.0.20.0060.01317.40
8.0.10.0080.00016.98
8.0.00.0060.01116.95
7.4.330.0000.00515.16
7.4.320.0090.00016.61
7.4.300.0000.00716.49
7.4.290.0040.00416.60
7.4.280.0060.00316.59
7.4.270.0030.00316.65
7.4.260.0030.00316.61
7.4.250.0080.00016.47
7.4.240.0000.00716.53
7.4.230.0000.00716.39
7.4.220.0090.01316.61
7.4.210.0090.00616.55
7.4.200.0070.00016.36
7.4.160.0110.00516.61
7.4.150.0080.01417.40
7.4.140.0120.01017.86
7.4.130.0110.01016.68
7.4.120.0120.00516.56
7.4.110.0090.01216.57
7.4.100.0090.00916.45
7.4.90.0070.01116.61
7.4.80.0090.00919.39
7.4.70.0130.00416.48
7.4.60.0130.01016.73
7.4.50.0040.00416.73
7.4.40.0030.01316.56
7.4.30.0130.00316.36
7.4.00.0090.00614.90
7.3.330.0000.00613.27
7.3.320.0000.00513.18
7.3.310.0040.00316.27
7.3.300.0030.00316.35
7.3.290.0120.00416.35
7.3.280.0080.00816.35
7.3.270.0140.00417.40
7.3.260.0100.00716.56
7.3.250.0070.01516.57
7.3.240.0080.01816.40
7.3.230.0090.00916.39
7.3.210.0160.00016.39
7.3.200.0070.01419.39
7.3.190.0100.01016.34
7.3.180.0120.00616.52
7.3.170.0120.00316.62
7.3.160.0060.01016.40
7.2.330.0080.00816.70
7.2.320.0120.00916.43
7.2.310.0120.01216.64
7.2.300.0090.00916.39
7.2.290.0100.01216.65
7.2.00.0060.00619.52
7.1.200.0070.00415.68
7.1.100.0120.00318.06
7.1.70.0030.00317.16
7.1.60.0070.01419.34
7.1.50.0070.01716.66
7.1.00.0000.08022.33
7.0.200.0000.01016.79
7.0.140.0070.03021.99
7.0.60.0070.08319.79
7.0.50.0000.06017.91
7.0.40.0000.04720.06
7.0.30.0200.04720.13
7.0.20.0230.07720.15
7.0.10.0030.09020.03
7.0.00.0030.08720.09
5.6.280.0130.06321.13
5.6.210.0130.07320.61
5.6.200.0100.08018.09
5.6.190.0070.07020.63
5.6.180.0130.04720.43
5.6.170.0170.04320.48
5.6.160.0100.03720.52
5.6.150.0100.05718.13
5.6.140.0170.05318.11
5.6.130.0100.07718.15
5.6.120.0000.05320.96
5.6.110.0100.08021.02
5.6.100.0030.04020.97
5.6.90.0100.08720.99
5.6.80.0030.08320.50
5.5.350.0200.04320.40
5.5.340.0100.06318.00
5.5.330.0000.09320.40
5.5.320.0270.04020.24
5.5.310.0230.08020.34
5.5.300.0070.04017.98
5.5.290.0070.08317.96
5.5.280.0000.07720.68
5.5.270.0130.05020.82
5.5.260.0030.06720.96
5.5.250.0200.06720.57
5.5.240.0030.04020.23
5.4.450.0430.07719.29
5.4.440.1030.05019.14
5.4.430.0000.07319.44
5.4.420.0230.05719.01
5.4.410.0070.06318.95
5.4.400.0170.07018.75
5.4.390.0200.05318.68
5.4.380.0170.05018.72
5.4.370.0100.05318.70
5.4.360.0130.05018.50
5.4.350.0170.02713.67
5.4.340.0100.03313.67
5.4.320.0070.04314.31
5.4.310.0070.04014.20
5.4.300.0130.03014.21
5.4.290.0030.04714.21
5.4.280.0070.03314.20
5.4.270.0100.03314.05
5.4.260.0100.03314.11
5.4.250.0070.03714.03
5.4.240.0070.04314.18
5.4.230.0030.04314.10
5.4.220.0130.03014.01
5.4.210.0100.03314.19
5.4.200.0070.04314.05
5.4.190.0100.04314.07
5.4.180.0030.04314.17
5.4.170.0200.03014.05
5.4.160.0030.04014.09
5.4.150.0100.03714.18
5.4.140.0030.04013.70
5.4.130.0030.04313.75
5.4.120.0130.03013.80
5.4.110.0130.03313.65
5.4.100.0000.04313.70
5.4.90.0030.04313.64
5.4.80.0100.04013.65
5.4.70.0100.03313.73
5.4.60.0100.03313.81
5.4.50.0100.04013.64
5.4.40.0030.04013.78
5.4.30.0070.03713.68
5.4.20.0070.03713.70
5.4.10.0100.03313.71
5.4.00.0070.04013.11
5.3.290.0070.04314.52
5.3.280.0130.03314.49
5.3.270.0070.04314.46
5.3.260.0070.04014.50
5.3.250.0070.03714.61
5.3.240.0130.03314.63
5.3.230.0030.04014.49
5.3.220.0170.03314.50
5.3.210.0070.04714.46
5.3.200.0070.04714.57
5.3.190.0070.04014.48
5.3.180.0030.04714.45
5.3.170.0100.03714.57
5.3.160.0100.04014.49
5.3.150.0170.05014.48
5.3.140.0070.03714.53
5.3.130.0100.04014.46
5.3.120.0070.04314.55
5.3.110.0070.04014.40
5.3.100.0070.04013.97
5.3.90.0030.04013.91
5.3.80.0100.03313.95
5.3.70.0070.04314.02
5.3.60.0070.03713.91
5.3.50.0130.04713.97
5.3.40.0030.04013.89
5.3.30.0070.04313.88
5.3.20.0070.03713.54
5.3.10.0000.04013.59
5.3.00.0100.03313.54
5.2.170.0030.03311.04
5.2.160.0100.03311.01
5.2.150.0030.03711.06
5.2.140.0070.03011.21
5.2.130.0100.03310.98
5.2.120.0100.02311.00
5.2.110.0000.04711.18
5.2.100.0070.03711.03
5.2.90.0070.02711.10
5.2.80.0100.03711.07
5.2.70.0130.03311.05
5.2.60.0070.03010.91
5.2.50.0030.03310.97
5.2.40.0100.02310.88
5.2.30.0030.03311.04
5.2.20.0100.02710.93
5.2.10.0100.02710.89
5.2.00.0070.02710.90
5.1.60.0030.02310.17
5.1.50.0000.0309.99
5.1.40.0000.0309.90
5.1.30.0070.02710.28
5.1.20.0070.02310.29
5.1.10.0000.03710.11
5.1.00.0000.03010.01
5.0.50.0030.0238.62
5.0.40.0000.0278.39
5.0.30.0030.0338.30
5.0.20.0070.0208.32
5.0.10.0030.0338.27
5.0.00.0000.0338.18
4.4.90.0030.0135.82
4.4.80.0030.0135.89
4.4.70.0000.0205.83
4.4.60.0000.0205.81
4.4.50.0070.0175.82
4.4.40.0030.0305.86
4.4.30.0070.0135.83
4.4.20.0000.0175.89
4.4.10.0030.0175.86
4.4.00.0030.0305.86
4.3.110.0070.0205.74
4.3.100.0030.0205.83
4.3.90.0100.0105.82
4.3.80.0070.0205.75
4.3.70.0070.0135.87
4.3.60.0070.0175.73
4.3.50.0070.0175.84
4.3.40.0000.0335.73
4.3.30.0030.0204.51
4.3.20.0000.0204.54
4.3.10.0000.0174.61
4.3.00.0070.0237.00

preferences:
48.05 ms | 400 KiB | 5 Q