array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'de', ), 'this' => array ( 0 => 'ds-collection.isempty.php', 1 => 'Ds\\Collection::isEmpty', ), 'up' => array ( 0 => 'class.ds-collection.php', 1 => 'Ds\\Collection', ), 'prev' => array ( 0 => 'ds-collection.copy.php', 1 => 'Ds\\Collection::copy', ), 'next' => array ( 0 => 'ds-collection.toarray.php', 1 => 'Ds\\Collection::toArray', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/ds/ds/collection/isempty.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PECL ds >= 1.0.0)
Ds\Collection::isEmpty — Returns whether the collection is empty
Diese Funktion besitzt keine Parameter.
Beispiel #1 Ds\Collection::isEmpty() example
<?php
$a = new \Ds\Vector([1, 2, 3]);
$b = new \Ds\Vector();
var_dump($a->isEmpty());
var_dump($b->isEmpty());
?>
Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:
bool(false) bool(true)