HH\Set::isEmpty

Description

public function isEmpty(): bool

Checks if the current Set is empty.

Return Values

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

Examples

<?hh

namespace Hack\UserDocumentation\API\Examples\Set\IsEmpty;

$s = Set {};
var_dump($s->isEmpty());

$s = Set {'red', 'green', 'blue', 'yellow'};
var_dump($s->isEmpty());
Output
bool(true)
bool(false)