HH\Set::keys
Returns a Vector
containing the values of the current Set
public function keys(): Vector<arraykey>;
Set
s don't have keys, so this will return the values.
This method is interchangeable with toVector()
and values()
.
Returns
Vector<arraykey>
- aVector
(integer-indexed) containing the values of the currentSet
.
Examples
This example shows that keys()
returns a Vector
of the Set
's values because Set
s don't have keys:
$s = Set {'red', 'green', 'blue', 'yellow'};
\var_dump($s->keys());