HH\Vector::firstKey
Returns the first key in the current Vector
public function firstKey(): ?int;
Returns
Examples
The following example gets the first key from Vector
. An empty Vector
will return null
as its first key.
$v = Vector {'red', 'green', 'blue', 'yellow'};
\var_dump($v->firstKey());
$v = Vector {};
\var_dump($v->firstKey());