3v4l.org

run code in 300+ PHP versions simultaneously
<?php function removeSomeElements(&$arr) { for ($i = 0; $i<count($arr); $i++) { $c = $arr[$i]; if ($c > 2) { echo "Element $c found at $i\n"; unset($arr[$i]); } } print_r($arr); // misses middle element return true; } $t = [0, 3, 1]; print_r($t); // original array $success = removeSomeElements($t); print_r($t); // should be missing middle element, but everything is here

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.0170.00316.58
8.3.60.0070.01116.63
8.3.50.0160.00318.21
8.3.40.0080.00818.52
8.3.30.0070.00718.60
8.3.20.0030.00618.98
8.3.10.0000.01021.17
8.3.00.0030.00523.36
8.2.190.0070.01118.29
8.2.180.0150.00625.92
8.2.170.0070.01122.96
8.2.160.0170.00322.96
8.2.150.0070.00025.66
8.2.140.0060.00324.66
8.2.130.0040.00419.95
8.2.120.0040.00426.35
8.2.110.0030.00620.52
8.2.100.0040.00817.78
8.2.90.0000.00819.26
8.2.80.0030.00517.97
8.2.70.0040.00417.63
8.2.60.0000.00917.93
8.2.50.0050.00318.07
8.2.40.0060.00320.07
8.2.30.0040.00418.13
8.2.20.0000.00818.13
8.2.10.0050.00319.96
8.2.00.0000.00719.37
8.1.280.0030.01725.92
8.1.270.0090.00022.01
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0050.00523.86
8.1.230.0040.00722.66
8.1.220.0080.00017.74
8.1.210.0050.00318.77
8.1.200.0090.00317.23
8.1.190.0050.00317.23
8.1.180.0060.00318.10
8.1.170.0130.00018.58
8.1.160.0000.00718.89
8.1.150.0070.00018.89
8.1.140.0050.00319.54
8.1.130.0090.00019.00
8.1.120.0040.00417.48
8.1.110.0090.00017.40
8.1.100.0000.00717.38
8.1.90.0000.01017.34
8.1.80.0050.00317.46
8.1.70.0080.00017.36
8.1.60.0040.00417.65
8.1.50.0000.00817.53
8.1.40.0050.00317.45
8.1.30.0050.00317.58
8.1.20.0040.00417.69
8.1.10.0000.00717.47
8.1.00.0000.00917.51
8.0.300.0070.00018.77
8.0.290.0040.00416.75
8.0.280.0030.00318.49
8.0.270.0000.00717.25
8.0.260.0000.00917.25
8.0.250.0030.00617.01
8.0.240.0050.00316.97
8.0.230.0080.00016.98
8.0.220.0020.00516.89
8.0.210.0030.00316.91
8.0.200.0030.00316.84
8.0.190.0030.00516.84
8.0.180.0080.00016.81
8.0.170.0030.00616.82
8.0.160.0040.00416.97
8.0.150.0030.00316.84
8.0.140.0000.00716.84
8.0.130.0060.00013.31
8.0.120.0020.00516.84
8.0.110.0000.00716.87
8.0.100.0080.00016.86
8.0.90.0030.00616.84
8.0.80.0020.01316.82
8.0.70.0050.00316.91
8.0.60.0000.00716.89
8.0.50.0000.00716.83
8.0.30.0070.01217.20
8.0.20.0080.01117.40
8.0.10.0000.00816.92
8.0.00.0130.00716.83
7.4.330.0000.00515.55
7.4.320.0030.00316.54
7.4.300.0050.00216.41
7.4.290.0000.00816.46
7.4.280.0000.00816.50
7.4.270.0060.00616.52
7.4.260.0050.00316.60
7.4.250.0040.00416.43
7.4.240.0070.00016.52
7.4.230.0050.00316.70
7.4.220.0040.00416.66
7.4.210.0040.01116.56
7.4.200.0040.00416.67
7.4.160.0110.00616.63
7.4.140.0090.00917.86
7.4.130.0100.00716.48
7.4.120.0090.00916.46
7.4.110.0100.00616.48
7.4.100.0110.00616.53
7.4.90.0170.00016.42
7.4.80.0070.01219.39
7.4.70.0100.00716.63
7.4.60.0030.01316.57
7.4.50.0120.00616.52
7.4.40.0060.01516.52
7.4.00.0090.00914.93
7.3.330.0050.00013.39
7.3.320.0000.00613.37
7.3.310.0000.00716.36
7.3.300.0030.00316.40
7.3.290.0040.00416.29
7.3.280.0070.01216.35
7.3.260.0130.00616.48
7.3.240.0100.00616.46
7.3.230.0070.01016.36
7.3.210.0080.00816.51
7.3.200.0060.00916.36
7.3.190.0100.00716.42
7.3.180.0080.00816.48
7.3.170.0100.00716.53
7.3.160.0050.01116.45
7.3.120.0080.00415.01
7.3.110.0090.00914.62
7.3.100.0080.00815.03
7.3.90.0040.01114.95
7.3.80.0030.00715.10
7.3.70.0070.00714.87
7.3.60.0000.01614.71
7.3.50.0000.01115.04
7.3.40.0060.00914.88
7.3.30.0000.01814.78
7.3.20.0060.00916.63
7.3.10.0000.01716.73
7.3.00.0050.00516.66
7.2.330.0100.01316.47
7.2.320.0150.00316.67
7.2.310.0080.01116.52
7.2.300.0100.00716.45
7.2.290.0100.01016.50
7.2.240.0120.00615.34
7.2.230.0050.00515.04
7.2.220.0040.01415.25
7.2.210.0110.00415.37
7.2.200.0100.00715.03
7.2.190.0090.00614.74
7.2.180.0030.00915.20
7.2.170.0070.00715.21
7.2.160.0130.00315.19
7.2.150.0090.00616.98
7.2.140.0030.01017.06
7.2.130.0140.00016.97
7.2.120.0040.01217.10
7.2.110.0040.01216.98
7.2.100.0000.01016.91
7.2.90.0070.00317.04
7.2.80.0040.01117.19
7.2.70.0100.00717.10
7.2.60.0140.00315.96
7.2.50.0090.00516.13
7.2.40.0200.00716.01
7.2.30.0250.00516.05
7.2.20.0090.00716.03
7.2.10.0080.00816.03
7.2.00.0200.00515.95
7.1.330.0090.00915.95
7.1.320.0100.00315.95
7.1.310.0030.01015.63
7.1.300.0000.00915.84
7.1.290.0060.00915.84
7.1.280.0120.00615.44
7.1.270.0040.00815.80
7.1.260.0030.01115.96
7.1.250.0000.01515.62
7.1.200.0000.00815.88
7.1.170.0050.00813.87
7.1.160.0340.00813.98
7.1.150.0330.00813.95
7.1.140.0250.00914.05
7.1.130.0080.00513.95
7.1.120.0500.00313.69
7.1.110.0070.00713.88
7.1.100.0240.01114.11
7.1.90.0280.00714.02
7.1.80.0330.00313.85
7.1.70.0030.01013.70
7.1.60.0780.01131.88
7.1.50.0480.00932.07
7.1.40.0260.00931.96
7.1.30.0520.01231.89
7.1.20.0700.00731.85
7.1.10.0370.01314.03
7.1.00.0360.00013.66

preferences:
33.79 ms | 401 KiB | 5 Q