HH\Lib\Dict\from_entries

This API is part of the Hack Standard Library, not HHVM itself.
Facebook Engineer?

This function is available as Dict\from_entries() in Facebook's www repository.

Returns a new dict where each mapping is defined by the given key/value tuples

Description

namespace HH\Lib\Dict;

function from_entries<Tk as arraykey, Tv>(
  Traversable<(Tk,Tv)> $entries,
): dict<Tk, Tv>;

In the case of duplicate keys, later values will overwrite the previous ones.

To create a dict from keys, see Dict\from_keys(). To create a dict from values, see Dict\from_values().

Parameters