• PHP Video Tutorials

PHP - Ds\PriorityQueue::copy() Function



Ds\PriorityQueue::copy() function can return a shallow copy of the queue.

Syntax

public Ds\PriorityQueue Ds\PriorityQueue::copy( void )

Ds\PriorityQueue::copy() function doesn't have any parameters.

Example

<?php  
   $pqueue = new \Ds\PriorityQueue();  
   $pqueue->push("Tutorials", 1); 
   $pqueue->push("Point", 2); 
   $pqueue->push("India", 3); 
  
   print_r($pqueue->copy());
?>
php_function_reference.htm
Advertisements