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

This function is available as Keyset\take() in Facebook's www repository.

Returns a new keyset containing the first $n elements of the given Traversable


namespace HH\Lib\Keyset;

function take<Tv as arraykey>(
  Traversable<Tv> $traversable,
  int $n,
): keyset<Tv>;

If there are duplicate values in the Traversable, the keyset may be shorter than the specified length.

To drop the first $n elements, see Keyset\drop().