about summary refs log tree commit diff
path: root/usth/ICT3.2/prac/4/5.php
blob: d148f5a32bee98e7f981cd0603d645cc2faebff8 (plain) (blame)
1
2
3
4
5
6
7
8
<?php

function is_prime(int $n): bool {
    for ($i = 2; $i * $i <= $n; $i++)
        if ($n % $i == 0)
            return false;
    return true;
}