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

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

Returns a new vec sorted by the values of the given Traversable


namespace HH\Lib\Vec;

function sort<Tv>(
  Traversable<Tv> $traversable,
  ?(function(Tv,Tv):int) $comparator = null,
): vec<Tv>;

If the optional comparator function isn't provided, the values will be sorted in ascending order.

To sort by some computable property of each value, see Vec\sort_by().