3v4l.org

run code in 300+ PHP versions simultaneously
<?php function f($var){ // not using references foreach($var as $k => $v){ unset($var[$k]); // shouldn't this unset from a copy?! } } print gettype($GLOBALS); f($GLOBALS); print gettype($GLOBALS);

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.0070.00716.50
8.3.50.0110.00717.38
8.3.40.0190.00318.67
8.3.30.0060.00918.75
8.3.20.0030.00518.77
8.3.10.0090.00020.67
8.3.00.0080.00019.38
8.2.180.0000.01516.38
8.2.170.0130.00722.96
8.2.160.0090.00620.69
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0080.00318.71
8.2.110.0070.00321.00
8.2.100.0080.00317.84
8.2.90.0050.00319.02
8.2.80.0040.00419.46
8.2.70.0040.00417.75
8.2.60.0030.00618.16
8.2.50.0030.00618.07
8.2.40.0080.00018.28
8.2.30.0040.00417.98
8.2.20.0060.00317.60
8.2.10.0050.00317.80
8.2.00.0040.00417.75
8.1.280.0110.00325.92
8.1.270.0090.00023.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00723.70
8.1.230.0110.00020.87
8.1.220.0000.00818.77
8.1.210.0000.00819.16
8.1.200.0060.00317.23
8.1.190.0050.00317.53
8.1.180.0040.00418.10
8.1.170.0040.00418.84
8.1.160.0000.00818.88
8.1.150.0050.00218.63
8.1.140.0000.00717.54
8.1.130.0030.00317.87
8.1.120.0000.00717.52
8.1.110.0040.00417.35
8.1.100.0000.00717.35
8.1.90.0000.00717.45
8.1.80.0040.00317.37
8.1.70.0050.00317.32
8.1.60.0030.00617.59
8.1.50.0040.00417.46
8.1.40.0000.00817.55
8.1.30.0040.00417.70
8.1.20.0060.00317.52
8.1.10.0040.00417.53
8.1.00.0040.00417.46
8.0.300.0080.00019.86
8.0.290.0080.00016.63
8.0.280.0000.00818.45
8.0.270.0000.00717.23
8.0.260.0060.00016.88
8.0.250.0050.00316.91
8.0.240.0030.00516.91
8.0.230.0030.00317.01
8.0.220.0030.00316.97
8.0.210.0070.00016.79
8.0.200.0030.00317.02
8.0.190.0070.00017.04
8.0.180.0000.00716.96
8.0.170.0090.00016.74
8.0.160.0030.00316.91
8.0.150.0060.00316.78
8.0.140.0000.00916.94
8.0.130.0000.00513.37
8.0.120.0050.00316.89
8.0.110.0000.00817.01
8.0.100.0050.00216.84
8.0.90.0070.00016.99
8.0.80.0040.01116.90
8.0.70.0040.00416.81
8.0.60.0070.00016.90
8.0.50.0050.00216.84
8.0.30.0070.01317.00
8.0.20.0050.01217.04
8.0.10.0000.00716.86
8.0.00.0160.00516.78
7.4.330.0000.00412.98
7.4.320.0000.00616.61
7.4.300.0040.00416.58
7.4.290.0060.00016.56
7.4.280.0060.00316.55
7.4.270.0030.00316.50
7.4.260.0000.00613.27
7.4.250.0050.00316.35
7.4.240.0000.00716.52
7.4.230.0030.00316.33
7.4.220.0070.00816.40
7.4.210.0100.01016.60
7.4.200.0030.00316.60
7.4.190.0070.00016.69
7.4.160.0100.00616.57
7.4.150.0060.01216.54
7.4.140.0100.00716.49
7.4.130.0100.00716.48
7.4.120.0100.00716.59
7.4.110.0090.00916.65
7.4.100.0120.00916.64
7.4.90.0030.01416.55
7.4.80.0030.01519.39
7.4.70.0090.00916.64
7.4.60.0040.01116.60
7.4.50.0000.00516.61
7.4.40.0040.01116.57
7.4.30.0060.00916.47
7.4.00.0030.00915.18
7.3.330.0030.00313.35
7.3.320.0000.00713.20
7.3.310.0070.00016.36
7.3.300.0030.00316.30
7.3.290.0110.00516.38
7.3.280.0120.00616.36
7.3.270.0060.01016.58
7.3.260.0060.01116.49
7.3.250.0070.01316.52
7.3.240.0090.00916.38
7.3.230.0060.00916.53
7.3.210.0130.00316.61
7.3.200.0120.00316.54
7.3.190.0060.01016.58
7.3.180.0030.01216.43
7.3.170.0030.01316.32
7.3.160.0130.00316.38
7.3.120.0030.01014.88
7.2.330.0190.00316.80
7.2.320.0090.00916.81
7.2.310.0120.01216.80
7.2.300.0090.01416.73
7.2.290.0040.01216.76
7.2.60.0100.00716.74
7.2.00.0030.01319.31
7.1.200.0030.00715.56
7.1.100.0070.00717.96
7.1.70.0040.00417.14
7.1.60.0100.01619.30
7.1.50.0140.01016.82
7.1.00.0100.06322.28
7.0.200.0320.00714.39
7.0.140.0030.07322.04
7.0.120.0000.07721.96
7.0.60.0130.05319.86
7.0.50.0100.05717.86
7.0.40.0070.06020.05
7.0.30.0330.06720.06
7.0.20.0230.05720.26
7.0.10.0130.07020.21
7.0.00.0130.07320.25
5.6.280.0070.07021.02
5.6.210.0130.08020.70
5.6.200.0030.04018.16
5.6.190.0030.06020.61
5.6.180.0270.04320.41
5.6.170.0100.05020.45
5.6.160.0030.06720.57
5.6.150.0130.06718.29
5.6.140.0070.04318.15
5.6.130.0030.04718.17
5.6.120.0170.07320.99
5.6.110.0200.07720.97
5.6.100.0100.06320.97
5.6.90.0130.04721.08
5.6.80.0170.07320.44
5.5.350.0300.07720.37
5.5.340.0030.08317.98
5.5.330.0030.04320.27
5.5.320.0430.07320.31
5.5.310.0300.06720.19
5.5.300.0030.08717.97
5.5.290.0000.04318.03
5.5.280.0100.04720.90
5.5.270.0070.08720.73
5.5.260.0030.08020.76
5.5.250.0130.06320.65
5.5.240.0070.08020.15
5.4.450.0070.06319.57
5.4.440.0070.07319.32
5.4.430.0030.07019.14
5.4.420.0070.07319.33
5.4.410.0100.04019.17
5.4.400.0130.07019.24
5.4.390.0070.08019.24
5.4.380.0130.06719.24
5.4.370.0100.06719.25
5.4.360.0070.04719.25
5.4.350.0070.05719.24
5.4.340.0070.07018.85
5.4.320.0130.05018.86
5.4.310.0130.07018.86
5.4.300.0000.05019.25
5.4.290.0100.05719.26
5.4.280.0100.04019.23
5.4.270.0070.04019.09
5.4.260.0070.06719.07
5.4.250.0030.05019.23
5.4.240.0070.03718.95
5.4.230.0100.05719.07
5.4.220.0130.06319.00
5.4.210.0030.08019.23
5.4.200.0130.04319.14
5.4.190.0070.07019.20
5.4.180.0030.04019.23
5.4.170.0030.05719.07
5.4.160.0070.05718.87
5.4.150.0000.04318.83
5.4.140.0170.04716.46
5.4.130.0030.03716.41
5.4.120.0100.07316.41
5.4.110.0030.03716.37
5.4.100.0000.04016.38
5.4.90.0170.06016.43
5.4.80.0130.03316.26
5.4.70.0130.03716.41
5.4.60.0000.05316.31
5.4.50.0030.07316.51
5.4.40.0070.07016.38
5.4.30.0100.06316.27
5.4.20.0030.04316.43
5.4.10.0100.05716.50
5.4.00.0100.06715.86
5.3.290.0030.07014.70
5.3.280.0030.08314.62
5.3.270.0100.07014.67
5.3.260.0070.06314.63
5.3.250.0030.05314.63
5.3.240.0030.07314.75
5.3.230.0070.08014.61
5.3.220.0070.04714.63
5.3.210.0070.04014.59
5.3.200.0070.06314.46
5.3.190.0070.03714.56
5.3.180.0000.08014.71
5.3.170.0070.03714.55
5.3.160.0130.05014.62
5.3.150.0070.04714.71
5.3.140.0130.07014.55
5.3.130.0100.04714.62
5.3.120.0100.07314.57
5.3.110.0030.07014.62
5.3.100.0100.04014.05
5.3.90.0100.07014.02
5.3.80.0100.07013.90
5.3.70.0030.08014.07
5.3.60.0000.04714.05
5.3.50.0070.06013.94
5.3.40.0000.06013.96
5.3.30.0070.07714.06
5.3.20.0070.05013.57
5.3.10.0000.07713.67
5.3.00.0070.07713.64
5.2.170.0070.05711.30
5.2.160.0130.05711.30
5.2.150.0030.06311.22
5.2.140.0100.05711.14
5.2.130.0070.07311.18
5.2.120.0070.06011.10
5.2.110.0000.05711.09
5.2.100.0030.04311.02
5.2.90.0000.06310.99
5.2.80.0030.06711.05
5.2.70.0030.03011.04
5.2.60.0070.02711.09
5.2.50.0030.03711.17
5.2.40.0030.05710.91
5.2.30.0000.06310.96
5.2.20.0030.06011.04
5.2.10.0070.05010.86
5.2.00.0100.05710.72
5.1.60.0100.05010.14
5.1.50.0000.03310.04
5.1.40.0000.0439.95
5.1.30.0100.04010.31
5.1.20.0030.04010.41
5.1.10.0030.04010.06
5.1.00.0030.05010.07
5.0.50.0000.0508.47
5.0.40.0130.0378.47
5.0.30.0000.0308.37
5.0.20.0030.0208.17
5.0.10.0000.0478.14
5.0.00.0030.0338.30
4.4.90.0000.0177.87
4.4.80.0000.0307.87
4.4.70.0070.0337.87
4.4.60.0030.0337.87
4.4.50.0000.0177.87
4.4.40.0070.0437.87
4.4.30.0070.0307.87
4.4.20.0000.0207.87
4.4.10.0030.0177.87
4.4.00.0030.0237.87
4.3.110.0000.0177.87
4.3.100.0030.0137.87
4.3.90.0030.0337.87
4.3.80.0000.0537.87
4.3.70.0000.0277.87
4.3.60.0030.0137.87
4.3.50.0030.0207.87
4.3.40.0030.0507.87
4.3.30.0030.0337.87
4.3.20.0000.0337.87
4.3.10.0000.0377.87
4.3.00.0030.0207.87

preferences:
53.29 ms | 401 KiB | 5 Q