HH\Pair::containsKey

Checks whether a provided key exists in the current Pair

public function containsKey<Tu super int>(
  Tu $key,
): bool;

This will only return true for provided keys of 0 and 1 since those are the only two keys that can exist in a Pair.

Parameters

  • Tu $key

Return Values

  • bool - true if the provided key exists in the Pair; false otherwise. This will only return true if the provided key is 0 or 1.