3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // Everything you enter here will be executed by our servers. Try it! $a = 5; $start = microtime(true); for ($i = 0; $i < 10000 $i++) { if ($a) { } } $stop = microtime(true); $diff = $stop - $start; var_dump($diff); $a = 5; $start = microtime(true); for ($j = 0; $j < 10000; $j++) { if ($a != 0) { } } $stop = microtime(true); $diff = $stop - $start; var_dump($diff);
Output for 5.4.0 - 5.4.17
Parse error: syntax error, unexpected '$i' (T_VARIABLE), expecting ';' in /in/5DHp0 on line 8
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_VARIABLE, expecting ';' in /in/5DHp0 on line 8
Process exited with code 255.