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)
5.4.120.0100.04312.01
5.4.110.0100.04212.00
5.4.100.0120.04212.00
5.4.90.0080.04512.00
5.4.80.0180.05412.00
5.4.70.0130.03712.00
5.4.60.0130.03912.00
5.4.50.0190.05412.00
5.4.40.0130.03911.98
5.4.30.0110.04211.98
5.4.20.0120.03811.98
5.4.10.0110.04011.98
5.4.00.0150.05511.47
5.3.220.0140.04212.68
5.3.210.0180.05712.68
5.3.200.0120.04212.68
5.3.190.0140.04512.68
5.3.180.0120.04212.67
5.3.170.0110.04312.67
5.3.160.0160.05812.67
5.3.150.0140.04112.67
5.3.140.0190.06112.66
5.3.130.0120.04712.66
5.3.120.0120.04412.66
5.3.110.0120.04412.66
5.3.100.0140.06112.12
5.3.90.0120.04112.09
5.3.80.0130.04012.08
5.3.70.0110.04212.08
5.3.60.0130.04112.06
5.3.50.0150.05912.01
5.3.40.0100.04312.01
5.3.30.0100.04211.96
5.3.20.0110.04211.74
5.3.10.0110.04011.71
5.3.00.0120.03911.69

preferences:
138.47 ms | 1394 KiB | 7 Q