HH\ImmSet::lastKey

Returns the last "key" in the current ImmSet

public function lastKey(): ?arraykey;

Since ImmSets do not have keys, it returns the last value.

This method is interchangeable with lastValue().

Returns

  • ?arraykey - The last value in the current ImmSet, or null if the current ImmSet is empty.

Examples

See [Set::lastKey](</hack/reference/class/Set/lastKey/#examples>) for usage examples.