HH\Lib\Keyset\keys
Returns a new keyset containing the keys of the given KeyedTraversable, maintaining the iteration order
namespace HH\Lib\Keyset;
function keys<Tk as arraykey, Tv>(
KeyedTraversable<Tk, Tv> $traversable,
): keyset<Tk>;
Parameters
KeyedTraversable<Tk,
Tv> $traversable
Returns
keyset<Tk>
Examples
$result = Keyset\keys(dict[1 => 100, 33 => 400 ]);
print_r($result);
//result: keyset[1,33]
$result = Keyset\keys(dict[]);
print_r($result);
//result: keyset[]