- var_dump: documentation ( source)
<?php
function test(...$args) { var_dump($args); }
test(1, 2, 3); // [1, 2, 3]
test(...[1, 2, 3]); // [1, 2, 3]
test(...new ArrayIterator([1, 2, 3])); // [1, 2, 3]
// Note: It doesn't really make sense to unpack a constant array like [1, 2, 3].
// Normally these would unpack some variable like ...$args