Ds\Set::isEmpty
PHP function
Edit on GitHub ✎
(PECL ds >= 1.0.0)
Returns whether the set is empty
Description
Ds\Set::isEmpty(): bool
Returns whether the set is empty.
Parameters Parameters
Return Values
Returns true if the set is empty, false otherwise.
Examples
Ds\Set::isEmpty() example
php
<?php
$a = new \Ds\Set([1, 2, 3]);
$b = new \Ds\Set();
var_dump($a->isEmpty());
var_dump($b->isEmpty());
?>The above example will output something similar to:
output
bool(false)
bool(true)