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(100, 9999); } while ( ! isPrime($i) ); var_dump($i);
Output for 5.3.0 - 5.4.28

Process exited with code 137.