Kod do znajdowania liczb pierwszych

<?php
              
              $no = 2;
              $total_display = 0;
              while ($total_display < 100 ) {
                $divisible_count = 0;
                for($i = 1; $i <=$no; $i++) {
                    if($no % $i == 0) {
                      $divisible_count += 1;
                    }
                }
                if($divisible_count < 3) {
                  echo $no . " ";
                  $total_display += 1;
                }
                $no += 1;
              }
?>
Outrageous Ostrich