3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function isPrime($number) { $max = floor(sqrt($number)); for ($i=1; $i < $max; $i++) { if ($number % $i == 0) return false; } return true; } do { $i = mt_rand(1, 999); while ( ! isPrime($i) ); var_dump($i);
Output for 5.4.0 - 5.5.12
Parse error: syntax error, unexpected end of file in /in/oK816 on line 16
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected $end in /in/oK816 on line 16
Process exited with code 255.