<?php declare(strict_types=1); function sum(int ...$numbers): int { $acc = 0; foreach ($numbers as $n) { $acc += $n; } return $acc; } echo sum(1, 2, 3, 4);
You have javascript disabled. You will not be able to edit any code.