HH\Lib\Dict\map_keys

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

Returns a new dict where each key is the result of calling the given function on the original key

namespace HH\Lib\Dict;

function map_keys<Tk1, Tk2 as arraykey, Tv>(
  KeyedTraversable<Tk1, Tv> $traversable,
  (function(Tk1):Tk2) $key_func,
): dict<Tk2, Tv>;

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

Parameters