PHP - Fonction Ds \ PriorityQueue :: isEmpty ()

La fonction Ds \ PriorityQueue :: isEmpty () peut retourner si la file d'attente est vide.

Syntaxe

public bool Ds\PriorityQueue::isEmpty( void )

La fonction Ds \ PriorityQueue :: isEmpty () n'a aucun paramètre.

La fonction Ds \ PriorityQueue :: isEmpty () peut retourner true si la file d'attente est vide, ou false dans le cas contraire.

Exemple

<?php  
   $pqueue = new \Ds\PriorityQueue();  
   
   var_dump($pqueue->isEmpty()); 
  
   $pqueue->push("Tutorials", 1); 
   $pqueue->push("Point", 2); 
   $pqueue->push("India", 3); 
  
   var_dump($pqueue->isEmpty()); 
?>