3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Initial Configuration global $aHash; $i = 0; $tmp = ''; while($i < 10000) { $tmp .= 'a'; ++$i; } $aHash = array_fill(100000000000000000000000, 100, $tmp); unset($i, $tmp); // Test Source function Test1_9() { global $aHash; /* The Test */ $t = microtime(true); reset($aHash); for ($i=0; $i<=5; $i++) echo $aHash[$i]; return (microtime(true) - $t); } // Variable Clean-up function Test1_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)
7.2.00.0000.01119.35
7.1.70.0060.00617.18
7.1.60.0030.02119.40
7.1.50.0190.01034.64
7.1.00.0070.07322.36
7.0.200.0180.00014.98
7.0.140.0000.07721.97
7.0.120.0030.07722.01
7.0.60.0100.08019.98
7.0.50.0030.04017.87
7.0.40.0070.04020.14
7.0.30.0230.06020.34
7.0.20.0300.05720.19
7.0.10.0430.08320.33
7.0.00.0030.04720.30
5.6.210.0070.08320.73
5.6.200.0100.08318.41
5.6.190.0130.05320.57
5.6.180.0200.04320.74
5.6.170.0230.04020.69
5.6.160.0100.08320.49
5.6.150.0100.06318.34
5.6.140.0070.05318.27
5.6.130.0000.04318.28
5.6.120.0070.08721.13
5.6.110.0130.08321.09
5.6.100.0000.09021.20
5.6.90.0000.08721.25
5.6.80.0100.03720.52
5.6.70.0230.02320.46
5.5.350.0300.08020.46
5.5.340.0070.08318.11
5.5.330.0030.04320.19
5.5.320.0000.04720.36
5.5.310.0300.07720.34
5.5.300.0100.06718.11
5.5.290.0030.07318.11
5.5.280.0070.06720.91
5.5.270.0130.08020.83
5.5.260.0030.04321.00
5.5.250.0100.08320.82
5.5.240.0070.08020.40
5.4.450.0100.05719.31
5.4.440.0200.06719.30
5.4.430.0000.04719.52
5.4.420.0100.07719.29
5.4.410.0070.03319.38
5.4.400.0070.04018.86
5.4.390.0000.06319.15
5.4.380.0070.04719.24
5.4.370.0030.04019.24
5.4.360.0070.05019.15
5.4.350.0030.08018.89
5.4.340.0000.06319.15
5.4.320.0030.05019.15
5.4.310.0070.04318.85
5.4.300.0070.08019.14
5.4.290.0000.04319.15
5.4.280.0070.04718.84
5.4.270.0070.06319.23
5.4.260.0030.08318.92
5.4.250.0030.07719.24
5.4.240.0000.05319.20
5.4.230.0070.07718.96
5.4.220.0100.07319.20
5.4.210.0070.04719.11
5.4.200.0030.07319.00
5.4.190.0030.04719.19
5.4.180.0170.06319.23
5.4.170.0070.05719.14
5.4.160.0070.07319.22
5.4.150.0030.05718.96
5.4.140.0030.05716.45
5.4.130.0170.06716.34
5.4.120.0130.06716.30
5.4.110.0070.06316.58
5.4.100.0070.06316.36
5.4.90.0200.04016.32
5.4.80.0170.06316.33
5.4.70.0100.04016.42
5.4.60.0100.06316.28
5.4.50.0030.08016.39
5.4.40.0030.07316.38
5.4.30.0070.06316.40
5.4.20.0070.03716.43
5.4.10.0100.06016.31
5.4.00.0030.07715.88
5.3.290.0000.05714.69
5.3.280.0130.06314.69
5.3.270.0070.06714.67
5.3.260.0070.04014.66
5.3.250.0030.08014.66
5.3.240.0000.06014.63
5.3.230.0030.08314.62
5.3.220.0100.06014.62
5.3.210.0130.05314.64
5.3.200.0070.06314.59
5.3.190.0030.08014.61
5.3.180.0030.04714.64
5.3.170.0070.04714.63
5.3.160.0100.07014.50
5.3.150.0170.05314.59
5.3.140.0070.07314.58
5.3.130.0070.07714.58
5.3.120.0030.05314.59
5.3.110.0100.05714.59
5.3.100.0000.08314.11
5.3.90.0100.06714.09
5.3.80.0030.07714.20
5.3.70.0130.03714.04
5.3.60.0070.07014.10
5.3.50.0070.05014.02
5.3.40.0130.06713.98
5.3.30.0100.06013.85
5.3.20.0130.06713.72
5.3.10.0100.06713.75
5.3.00.0100.07313.70
5.2.170.0030.07011.06
5.2.160.0030.03711.22
5.2.150.0070.05711.09
5.2.140.0130.04711.24
5.2.130.0070.06011.13
5.2.120.0000.06711.17
5.2.110.0070.06311.20
5.2.100.0070.06311.12
5.2.90.0070.06011.18
5.2.80.0030.06011.11
5.2.70.0000.07011.14
5.2.60.0030.05711.11
5.2.50.0130.06311.11
5.2.40.0030.06310.98
5.2.30.0070.06711.01
5.2.20.0070.06310.99
5.2.10.0070.06010.89
5.2.00.0130.05310.75
5.1.60.0030.0579.93
5.1.50.0070.05310.07
5.1.40.0070.0509.99
5.1.30.0100.03310.36
5.1.20.0100.02710.38
5.1.10.0030.06310.16
5.1.00.0070.03710.14
5.0.50.0030.0309.02
5.0.40.0130.0379.02
5.0.30.0030.0509.02
5.0.20.0030.0509.02
5.0.10.0030.0509.02
5.0.00.0030.0679.02
4.4.90.0030.0279.02
4.4.80.0030.0409.02
4.4.70.0000.0439.02
4.4.60.0030.0379.02
4.4.50.0000.0409.02
4.4.40.0030.0579.02
4.4.30.0030.0209.02
4.4.20.0000.0439.02
4.4.10.0030.0209.02
4.4.00.0000.0579.02
4.3.110.0000.0339.02
4.3.100.0030.0209.02
4.3.90.0100.0309.02
4.3.80.0030.0579.02
4.3.70.0030.0409.02
4.3.60.0030.0309.02
4.3.50.0000.0279.02
4.3.40.0000.0379.02
4.3.30.0000.0239.02
4.3.20.0070.0339.02
4.3.10.0000.0279.02
4.3.00.0070.0339.02

preferences:
35.99 ms | 401 KiB | 5 Q