HH\Pair::items

Returns an Iterable view of the current Pair

public function items(): Iterable<mixed>;

The Iterable returned is one that produces the values from the current Pair.

Returns

Examples

$p = Pair {'foo', -1.5};

// Get an Iterable view of the Pair
$iterable = $p->items();

// Print both values in the Iterable
foreach ($iterable as $value) {
  echo (string)$value."\n";
}