HH\Set::lastValue
Returns the last value in the current Set
public function lastValue(): ?Tv;
Returns
Examples
This example shows how lastValue()
can be used even when a Set
may be empty:
$s = Set {'red', 'green', 'blue', 'yellow'};
\var_dump($s->lastValue());
$s = Set {};
\var_dump($s->lastValue());