HH\Set::values

Returns a Vector containing the values of the current Set.

Description

public function values(): Vector<Tv>

Returns a Vector containing the values of the current Set.

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

Return Values

Examples

<?hh

namespace Hack\UserDocumentation\API\Examples\Set\Values;

$s = Set {'red', 'green', 'blue', 'yellow'};

$v = $s->values();

var_dump($v);
Output
object(HH\Vector)#2 (4) {
  [0]=>
  string(3) "red"
  [1]=>
  string(5) "green"
  [2]=>
  string(4) "blue"
  [3]=>
  string(6) "yellow"
}