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

function factorial(int $n): int {
    return $n > 1 ? $n * factorial($n - 1) : 1;
}