3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php global $x; $i = 0; $tmp = ''; while($i < 100000) { $tmp .= 'a'; ++$i; } $x = array_fill(5, 1000, $tmp); unset($i, $tmp); function Test3_4() { global $x; $t = microtime(true); for ($i=0; $i return (microtime(true) - $t); } function Test3_End() { global $x; unset($x); } Test3_End(); $returnData = Test3_4(); $microtime = ($returnData * 1000000); echo "execution time is ".$microtime." micro seconds."; ?>
Output for 5.4.0 - 5.4.35
Parse error: syntax error, unexpected 'return' (T_RETURN), expecting ';' in /in/9cAO0 on line 14
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected T_RETURN, expecting ';' in /in/9cAO0 on line 14
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_RETURN, expecting ';' in /in/9cAO0 on line 14
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `';'' in /in/9cAO0 on line 14
Process exited with code 255.