5 function is_prime ($num) {
7 if($num < 2) { return (0); }
8 if ( ($num > 2) && (($num %
2) == 0) ) { return (0); }
11 if ( ($num %
$i) == 0 ) { return (0); }
19 //Prvocisla: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, \85
20 //echo(is_prime(1)."\n".(7%2)); //Debug
28 while ($min <= $max) {
30 echo($min."\n"); //Show all primes
31 $total_primes++
; //Count all primes
37 echo("\nPrimes total: ".$total_primes."\n"); //Total number of primes
This page took 1.723268 seconds and 4 git commands to generate.