fork download
  1. <?php
  2.  
  3. function isPrime($num) {
  4. if ($num <= 1) return false;
  5. for ($i = 2; $i * $i <= $num; $i++) {
  6. if ($num % $i == 0) return false;
  7. }
  8. return true;
  9. }
  10.  
  11. echo isPrime(87);
  12. ?>
Success #stdin #stdout 0.03s 25904KB
stdin
Standard input is empty
stdout
Standard output is empty