3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function isPrime($number) { if ($number < 2) { return false; } for ($i=2; $i<=($number / 2); $i++) { if($number % $i == 0) { return false; } } return true; } for($i = 0; $i < 500; i++) { if(isPrime($i)) echo $i.'<br />'; }
Output for 5.4.0 - 5.4.16
Parse error: syntax error, unexpected '++' (T_INC), expecting ')' in /in/YNY5o on line 16
Process exited with code 255.
Output for 5.3.0 - 5.3.26
Parse error: syntax error, unexpected T_INC, expecting ')' in /in/YNY5o on line 16
Process exited with code 255.