3v4l.org

run code in 300+ PHP versions simultaneously
<?php global $aHash; $i=0; $tmp=''; while($i<10000){$tmp.='a';++$i;} $aHash=array_fill(100000000000000000000000, 100, $tmp); unset($i, $tmp); Test2_3(); Test2_End(); function Test2_3()  {     global $aHash; $t = microtime(true);     $key = array_keys($aHash);     $size = sizeOf($key);     for ($i=0;$i<$size;$i++)  $aHash[$key[$i]].="a";  return (microtime(true) - $t); } function Test2_End()  {     global $aHash; unset($aHash); } ?>

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)
5.4.310.0200.04718.98
5.4.300.0270.04019.19
5.4.290.0300.06719.20
5.4.280.0230.06719.16
5.4.270.0070.07319.24
5.4.260.0200.04719.15
5.4.250.0300.06719.20
5.4.240.0230.04319.08
5.4.230.0200.04719.09
5.4.220.0270.04718.94
5.4.210.0170.04018.94
5.4.200.0130.04019.17
5.4.190.0270.05719.21
5.4.180.0270.04719.15
5.4.170.0170.05018.84
5.4.160.0170.05019.21
5.4.150.0200.04319.13
5.4.140.0200.06016.38
5.4.130.0270.03716.39
5.4.120.0270.04316.41
5.4.110.0230.05016.42
5.4.100.0270.03716.56
5.4.90.0230.05716.59
5.4.80.0230.06016.60
5.4.70.0200.07016.59
5.4.60.0300.04016.16
5.4.50.0230.07316.38
5.4.40.0300.06316.43
5.4.30.0270.07016.38
5.4.20.0170.05316.53
5.4.10.0200.06716.44
5.4.00.0270.07015.76
5.3.280.0130.06714.49
5.3.270.0200.07014.56
5.3.260.0200.05314.61
5.3.250.0200.07314.49
5.3.240.0100.06014.49
5.3.230.0300.06014.54
5.3.220.0330.06314.49
5.3.210.0300.06314.66
5.3.200.0230.05314.49
5.3.190.0230.04714.50
5.3.180.0170.04314.52
5.3.170.0200.06714.49
5.3.160.0230.04314.49
5.3.150.0200.04014.66
5.3.140.0270.04314.67
5.3.130.0270.07014.49
5.3.120.0300.05314.59
5.3.110.0270.02714.49
5.3.100.0300.05714.49
5.3.90.0200.05314.49
5.3.80.0130.04314.49
5.3.70.0200.05314.49
5.3.60.0270.05314.49
5.3.50.0270.04314.49
5.3.40.0300.06714.49
5.3.30.0230.03314.49
5.3.20.0230.05014.49
5.3.10.0230.03014.49
5.3.00.0000.06314.49
5.2.170.0270.04714.49
5.2.160.0170.04014.49
5.2.150.0200.03714.49
5.2.140.0130.06714.49
5.2.130.0230.02714.49
5.2.120.0100.03314.49
5.2.110.0070.05314.49
5.2.100.0030.04314.49
5.2.90.0200.04714.49
5.2.80.0200.04014.49
5.2.70.0200.05714.49
5.2.60.0200.05714.49
5.2.50.0230.05014.49
5.2.40.0230.05714.49
5.2.30.0200.07014.49
5.2.20.0130.05014.49
5.2.10.0200.05314.49
5.2.00.0130.04714.49
5.1.60.0170.05014.49
5.1.50.0130.05314.49
5.1.40.0270.03014.49
5.1.30.0130.02714.49
5.1.20.0070.03314.49
5.1.10.0230.04014.49
5.1.00.0130.05014.49
5.0.50.0070.02314.49
5.0.40.0070.02314.49
5.0.30.0030.06714.49
5.0.20.0170.03314.49
5.0.10.0100.04714.49
5.0.00.0070.06314.49
4.4.90.0070.01714.49
4.4.80.0070.02714.49
4.4.70.0070.02314.49
4.4.60.0130.02714.49
4.4.50.0130.03014.49
4.4.40.0100.04014.49
4.4.30.0100.03314.49
4.4.20.0130.03014.49
4.4.10.0070.03014.49
4.4.00.0070.03714.49
4.3.110.0070.02714.49
4.3.100.0130.02714.49
4.3.90.0100.03314.49
4.3.80.0100.04014.49
4.3.70.0030.02314.49
4.3.60.0100.02714.49
4.3.50.0100.02014.49
4.3.40.0070.05314.49
4.3.30.0070.03314.49
4.3.20.0030.03014.49
4.3.10.0070.02314.49
4.3.00.0030.02714.49

preferences:
135.74 ms | 1398 KiB | 7 Q