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

Ds\Vector::isEmpty

(PECL ds >= 1.0.0)

Ds\Vector::isEmptyReturns whether the vector is empty

Опис

public Ds\Vector::isEmpty(): bool

Returns whether the vector is empty.

Параметри

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

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

Returns true if the vector is empty, false otherwise.

Приклади

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

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

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

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

bool(false)
bool(true)