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

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

Returns a new dict in which each value appears exactly once, where the value's uniqueness is determined by transforming it to a scalar via the given function


namespace HH\Lib\Dict;

function unique_by<Tk as arraykey, Tv, Ts as arraykey>(
  KeyedContainer<Tk, Tv> $container,
  (function(Tv):Ts) $scalar_func,
): dict<Tk, Tv>;

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

For arraykey values, see Dict\unique().