HH\Map::clear

Remove all the elements from the current Map

public function clear(): Map<Tk, Tv>;

Future changes made to the current Map ARE reflected in the returned Map, and vice-versa.

Returns

Examples

$m = Map {
  'red' => '#ff0000',
  'green' => '#00ff00',
  'blue' => '#0000ff',
  'yellow' => '#ffff00',
};
\var_dump($m);

$m->clear();
\var_dump($m);