3v4l.org

run code in 300+ PHP versions simultaneously
<?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/5bDcd 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/5bDcd on line 8
Process exited with code 255.

preferences:
175.94 ms | 1395 KiB | 53 Q