Requiring something that is both Countable and Traversable previously meant declaring an interface extending both and changing every implementing class.
public function summarise(Countable&Traversable $rows): Summary
{
return new Summary(count($rows), iterator_to_array($rows));
}
// PURE intersection — class types only, and no mixing:
// Countable&Traversable ok
// Countable&null error
// Countable&int error
// A&B|C error, until 8.2 (DNF types)
The restriction to class and interface types is what “pure” means, and it rules out the nullable case that everybody wants first — ?(A&B) is not expressible until 8.2 brings disjunctive normal form types. Within that limit it removes a real class of ceremony: the marker interface that existed only to name a combination, and the retrofit onto third-party classes that was never possible at all.