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