HH\Lib\Keyset\filter_with_key

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

Returns a new keyset containing only the values for which the given predicate returns true

namespace HH\Lib\Keyset;

function filter_with_key<Tk, Tv as arraykey>(
  KeyedTraversable<Tk, Tv> $traversable,
  (function(Tk,Tv):bool) $predicate,
): keyset<Tv>;

If you don't need access to the key, see Keyset\filter().

Parameters