HH\Set::keys

Returns a Vector containing the values of the current Set

public function keys(): Vector<arraykey>;

Sets don't have keys, so this will return the values.

This method is interchangeable with toVector() and values().

Returns

Examples

This example shows that keys() returns a Vector of the Set's values because Sets don't have keys:

$s = Set {'red', 'green', 'blue', 'yellow'};
\var_dump($s->keys());