I have a relatively simple function which uses a foreach
foreach
function foo($t) { $result; foreach($t as $val) { $result = dosometh
PHP 7.1 introduces the iterable type declaration for this purpose, which accepts both arrays and instances of \Traversable.
\Traversable
In previous versions, you'll have to omit the type declaration.