Hey, I was working with a PHP function that takes multiple arguments and formats them. Currently, I\'m working with something like this:
function foo($a1 =
Or as of PHP 7.1 you are now able to use a type hint called iterable
function f(iterable $args) {
foreach ($args as $arg) {
// awesome stuff
}
}
Also, it can be used instead of Traversable when you iterate using an interface. As well as it can be used as a generator that yields the parameters.
Documentation