vriadic функция в PHP
<?php
function sum(int ...$numbers): int
{
$total = 0;
for ($i = 0; $i < count($numbers); $i++) {
$total += $numbers[$i];
}
return $total;
}
Code language: PHP (php)
Green Team