HH\ImmSet::firstKey

Returns the first "key" in the current ImmSet

Description

public function firstKey(): mixed

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

This method is interchangeable with firstValue().

Return Values

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

Examples

See Set::firstKey for usage examples.