HH\Vector::count

Returns the number of elements in the current Vector

public function count(): int;

Returns

  • int - The number of elements in the current Vector.

Examples

$v = Vector {};
\var_dump($v->count());

$v = Vector {'red', 'green', 'blue', 'yellow'};
\var_dump($v->count());