HH\Pair::count

Returns 2; a Pair always has two values

public function count(): int;

Returns

  • int - 2

Examples

This shows that a Pair always has a count of 2:

$p = Pair {'foo', -1.5};
\var_dump($p->count());

$p = Pair {null, null};
\var_dump($p->count());