array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'uk', ), 'this' => array ( 0 => 'ds-set.isempty.php', 1 => 'Ds\\Set::isEmpty', 2 => 'Returns whether the set is empty', ), 'up' => array ( 0 => 'class.ds-set.php', 1 => 'Ds\\Set', ), 'prev' => array ( 0 => 'ds-set.intersect.php', 1 => 'Ds\\Set::intersect', ), 'next' => array ( 0 => 'ds-set.join.php', 1 => 'Ds\\Set::join', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/ds/ds/set/isempty.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

Ds\Set::isEmpty

(PECL ds >= 1.0.0)

Ds\Set::isEmptyReturns whether the set is empty

Опис

public Ds\Set::isEmpty(): bool

Returns whether the set is empty.

Параметри

У цієї функції немає параметрів.

Значення, що повертаються

Returns true if the set is empty, false otherwise.

Приклади

Приклад #1 Ds\Set::isEmpty() example

<?php
$a
= new \Ds\Set([1, 2, 3]);
$b = new \Ds\Set();

var_dump($a->isEmpty());
var_dump($b->isEmpty());
?>

Поданий вище приклад виведе щось схоже на:

bool(false)
bool(true)