3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $finish="a"; while($finish="a"){ $i = (mt_rand(0,999)); $counter = 0; for($j=1;$j<=$i;$j++){ //all divisible factors if($i % $j==0){ $counter++; } //prime requires 2 rules ( divisible by 1 and divisible by itself) if($counter==2){ print $i." is Prime <br/>"; $finish="b"; } } }