3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // Initial Configuration global $x; $i = 0; $tmp = ''; while($i < 10000) { $tmp .= 'a'; ++$i; } $x = array_fill(5, 1000, $tmp); unset($i, $tmp); // Test Source function Test3_2() { global $x; /* The Test */ $t = microtime(true); for ($i=0; $i<count($x); $i++); return (microtime(true) - $t); } // Variable Clean-up function Test3_End() { global $x; unset($x); } ?>
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0