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 Test2_1() { global $aHash; /* The Test */ $t = microtime(true); reset($aHash); foreach($aHash as $key=>$val) $aHash[$key] .= "a"; return (microtime(true) - $t); } // Variable Clean-up function Test2_End() { global $aHash; unset($aHash); } Test2_1(); ?>

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.3.10.0100.01016.41
7.3.00.0070.01016.39
7.2.130.0150.00717.05
7.2.120.0150.00616.75
7.2.110.0060.00916.73
7.2.100.0080.01216.71
7.2.90.0070.01516.85
7.2.80.0090.00616.88
7.2.70.0090.00816.73
7.2.60.0100.01016.98
7.2.50.0140.00416.95
7.2.40.0100.00716.38
7.2.30.0120.00316.91
7.2.20.0130.00316.64
7.2.10.0060.00916.80
7.2.00.0030.01118.10
7.1.250.0090.00915.75
7.1.70.0070.00216.95
7.1.60.0060.00617.25
7.1.50.0060.01617.14
7.1.00.0030.07722.57
7.0.200.0120.00916.22
7.0.140.0030.07722.00
7.0.60.0030.09020.01
7.0.50.0130.07717.88
7.0.40.0030.04320.05
7.0.30.0530.07020.06
7.0.20.0200.05320.23
7.0.10.0030.07320.06
7.0.00.0030.09320.16
5.6.280.0030.07722.06
5.6.210.0070.08321.58
5.6.200.0000.05019.11
5.6.190.0030.08321.14
5.6.180.0270.04721.15
5.6.170.0230.04721.34
5.6.160.0030.06021.33
5.6.150.0070.06319.11
5.6.140.0030.09019.11
5.6.130.0070.08319.06
5.6.120.0030.08721.67
5.6.110.0100.08022.01
5.6.100.0170.07321.93
5.6.90.0100.08021.88
5.6.80.0170.05321.50
5.5.350.0170.06721.44
5.5.340.0130.07718.89
5.5.330.0070.03721.04
5.5.320.0230.05021.11
5.5.310.0300.06321.11
5.5.300.0100.08019.00
5.5.290.0100.08718.84
5.5.280.0130.08021.80
5.5.270.0070.08321.80
5.5.260.0070.04021.93
5.5.250.0100.06021.51
5.5.240.0230.08021.19
5.4.450.0070.06720.32
5.4.440.0830.06020.16
5.4.430.0770.05320.14
5.4.420.0670.00020.22
5.4.410.0670.00020.09
5.4.400.0630.00019.75
5.4.390.0630.00019.71
5.4.380.0670.00019.77
5.4.370.0630.00019.72
5.4.360.0600.00019.73
5.4.350.0670.00019.92
5.4.340.0060.03512.80
5.4.320.0070.03613.29
5.4.310.0090.04513.28
5.4.300.0070.03713.29
5.4.290.0060.04413.28
5.4.280.0060.03613.18
5.4.270.0050.03813.18
5.4.260.0060.04013.18
5.4.250.0100.03413.18
5.4.240.0080.03513.18
5.4.230.0040.04013.17
5.4.220.0080.03513.17
5.4.210.0070.03813.17
5.4.200.0020.04213.17
5.4.190.0070.03913.17
5.4.180.0080.03713.17
5.4.170.0130.04413.18
5.4.160.0070.04113.17
5.4.150.0050.04213.16
5.4.140.0100.03412.85
5.4.130.0080.03412.84
5.4.120.0070.03612.80
5.4.110.0060.03712.79
5.4.100.0030.03912.80
5.4.90.0090.03512.79
5.4.80.0070.03712.80
5.4.70.0060.03612.79
5.4.60.0080.03712.79
5.4.50.0040.03912.79
5.4.40.0100.03212.78
5.4.30.0060.03612.77
5.4.20.0080.04312.78
5.4.10.0050.04512.77
5.4.00.0070.04812.27
5.3.290.0100.03913.68
5.3.280.0080.03913.61
5.3.270.0060.04513.63
5.3.260.0100.05113.62
5.3.250.0070.04213.63
5.3.240.0060.03913.62
5.3.230.0070.03913.61
5.3.220.0050.04313.59
5.3.210.0060.04013.59
5.3.200.0060.03813.58
5.3.190.0060.03913.59
5.3.180.0150.03613.58
5.3.170.0090.03613.58
5.3.160.0060.04413.65
5.3.150.0130.04213.58
5.3.140.0060.03813.57
5.3.130.0080.03913.57
5.3.120.0110.03613.56
5.3.110.0120.03813.56
5.3.100.0080.03613.05
5.3.90.0090.03513.04
5.3.80.0050.03813.03
5.3.70.0100.03813.03
5.3.60.0050.03813.02
5.3.50.0070.03612.96
5.3.40.0070.04012.96
5.3.30.0060.03612.93
5.3.20.0070.03612.70
5.3.10.0090.04012.66
5.3.00.0050.03912.65
5.2.170.0060.0319.95
5.2.160.0060.03110.21
5.2.150.0060.0309.95
5.2.140.0060.0309.95
5.2.130.0040.0319.91
5.2.120.0040.0299.91
5.2.110.0040.0319.91
5.2.100.0030.0319.90
5.2.90.0060.0299.91
5.2.80.0070.0299.90
5.2.70.0060.0309.90
5.2.60.0010.0349.86
5.2.50.0030.0329.82
5.2.40.0060.0289.80
5.2.30.0040.0319.77
5.2.20.0060.02910.04
5.2.10.0040.0319.67
5.2.00.0060.0299.55
5.1.60.0060.0239.07
5.1.50.0020.0289.07
5.1.40.0070.0239.06
5.1.30.0070.0289.40
5.1.20.0070.0279.42
5.1.10.0060.0259.14
5.1.00.0060.0269.15
5.0.50.0030.0237.63
5.0.40.0060.0277.49
5.0.30.0020.0357.30
5.0.20.0040.0227.29
5.0.10.0050.0217.27
5.0.00.0040.0327.26
4.4.90.0050.0155.64
4.4.80.0050.0155.62
4.4.70.0020.0195.62
4.4.60.0010.0195.62
4.4.50.0020.0185.64
4.4.40.0030.0275.64
4.4.30.0040.0175.63
4.4.20.0030.0175.70
4.4.10.0030.0255.69
4.4.00.0010.0295.66
4.3.110.0030.0175.57
4.3.100.0040.0165.55
4.3.90.0060.0215.57
4.3.80.0040.0295.57
4.3.70.0050.0175.57
4.3.60.0070.0165.57
4.3.50.0000.0205.56
4.3.40.0070.0235.52
4.3.30.0030.0214.33
4.3.20.0010.0194.31
4.3.10.0040.0174.27
4.3.00.0030.0277.03

preferences:
35.91 ms | 401 KiB | 5 Q