HH\ImmSet::lastKey

Returns the last "key" in the current ImmSet.

Description

public function lastKey(): mixed

Returns the last "key" in the current ImmSet.

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

This method is interchangeable with lastValue().

Return Values

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

Examples

See Set::lastKey for usage examples.