HH\Map::isEmpty

Checks if the current Map is empty

public function isEmpty(): bool;

Returns

  • bool - true if the current Map is empty; false otherwise.

Examples

$m = Map {};
\var_dump($m->isEmpty());

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