<?php declare(strict_types=1); function sum(array $ints): int { (function (int ...$ints) {})(...$ints); return array_sum($ints); } var_dump(sum([1, 2, 3])); var_dump(sum([1, 2, "three"]));
You have javascript disabled. You will not be able to edit any code.