HH\Map::fromArray

Returns a Map containing the key/value pairs from the specified array.

Deprecation

Use new Map($arr) instead.

Description

public static function fromArray(
  array<Tk,Tv> $arr,
): Map<Tk,Tv>

Returns a Map containing the key/value pairs from the specified array.

This function is deprecated. Use newMap($arr) instead.

Parameters

  • array<Tk,Tv> $arr - The array to convert to a Map.

Return Values