// *** before: ***
/**
* @param (Countable&Iterator)|null $items
*/
function consume($items) {
if ($items !== null) {
echo count($items);
}
}
// *** in version 8.2: ***
function consume((Countable&Iterator)|null $items): void {
if ($items !== null) {
echo count($items);
}
}