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_1() { global $x; /* The Test */ $t = microtime(true); $size = count($x); for ($i=0; $i<$size; $i++); return (microtime(true) - $t); } // Variable Clean-up function Test3_End() { global $x; unset($x); } ?>
Output for 4.3.0 - 7.1.0