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

This function is available as Vec\intersect() in Facebook's www repository.

Returns a new vec containing only the elements of the first Traversable that appear in all the other ones


namespace HH\Lib\Vec;

function intersect<Tv as arraykey>(
  Traversable<Tv> $first,
  Traversable<Tv> $second,
  Traversable<Tv> ...$rest,
): vec<Tv>;

Duplicate values are preserved.