PHP 7.1 iterable type hint

Code
<?php

$generator = function() {
    yield 1;
    yield 2;
    yield 3;
};

$array = [1, 2, 3];

$function = function(iterable $iterable) : void {
    foreach ($iterable as $int) {
        echo $int . PHP_EOL;
    }
};

$function($generator());
$function($array);
Result
1
2
3
1
2
3
Used Versions
PHP 8.3, Laminas MVC 3.2, Symfony 5.2, Laravel 8.28, PHPUnit 9.5, Doctrine ORM 2.8