3v4l.org

run code in 300+ PHP versions simultaneously
<?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); } ?>

preferences:
29.48 ms | 402 KiB | 5 Q