array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'pt_BR', ), 'this' => array ( 0 => 'ds-stack.isempty.php', 1 => 'Ds\\Stack::isEmpty', ), 'up' => array ( 0 => 'class.ds-stack.php', 1 => 'Ds\\Stack', ), 'prev' => array ( 0 => 'ds-stack.count.php', 1 => 'Ds\\Stack::count', ), 'next' => array ( 0 => 'ds-stack.jsonserialize.php', 1 => 'Ds\\Stack::jsonSerialize', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'pt_BR', 'path' => 'reference/ds/ds/stack/isempty.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PECL ds >= 1.0.0)
Ds\Stack::isEmpty — Retorna se a pilha está vazia
Esta função não possui parâmetros.
Exemplo #1 Exemplo de Ds\Stack::isEmpty()
<?php
$a = new \Ds\Stack([1, 2, 3]);
$b = new \Ds\Stack();
var_dump($a->isEmpty());
var_dump($b->isEmpty());
?>
O exemplo acima produzirá algo semelhante a:
bool(false) bool(true)