- Output for 7.1.0 - 7.1.17, 7.2.0 - 7.2.6
- Parse error: syntax error, unexpected ',', expecting '=' in /in/EtQhP on line 8
Process exited with code 255.
<?php
declare(strict_types=1);
namespace funcs {
function int(int ...$ints) {}
declare(int, 'funcs\int');
}
namespace {
function sum(array $ints): int {
(funcs\int)(...$ints);
return array_sum($ints);
}
var_dump(sum([1, 2, 3]));
var_dump(sum([1, 2, "three"]));
}