PHP Ds\Queue push() Function Last Updated : 23 Aug, 2019 Summarize Comments Improve Suggest changes Share Like Article Like Report The Ds\Queue::push() Function in PHP is used to push or insert values in a PriorityQueue instance. This function can also insert a list of values directly to the Queue. Syntax: void public Ds\Queue::push($value1, $value2, .... $valueN) Parameters: This function accepts a list of values separated by spaces as parameter. All of these values are pushed or inserted in the Queue one after other. Return Value: This function does not returns any value. Below program illustrate the Ds\Queue::push() Function in PHP: Program 1: php <?php // Declare new Queue $q = new \Ds\Queue(); // Add elements to the Queue $q->push("One"); $q->push("Two"); $q->push("Three"); echo "Queue is: \n"; print_r($q); ?> Output: Queue is: Ds\Queue Object ( [0] => One [1] => Two [2] => Three ) Program 2: php <?php // Declare new Queue $q = new \Ds\Queue(); // Add elements to the Queue $q->push("One"); $q->push("Two", "2"); $q->push("Three", "3", "4"); echo "Queue is: \n"; print_r($q); ?> Output: Queue is: Ds\Queue Object ( [0] => One [1] => Two [2] => 2 [3] => Three [4] => 3 [5] => 4 ) Reference: http://php.net/manual/en/ds-priorityqueue.push.php Comment More infoAdvertise with us Next Article PHP | DsStack push() Function G gopaldave Follow Improve Article Tags : Web Technologies PHP PHP-function PHP-ds_queue Similar Reads PHP DsQueue push() Function The Ds\Queue::push() Function in PHP is used to push or insert values in a PriorityQueue instance. This function can also insert a list of values directly to the Queue. Syntax: void public Ds\Queue::push($value1, $value2, .... $valueN) Parameters: This function accepts a list of values separated by 1 min read PHP | DsStack push() Function The Ds\Stack::push() function of PHP is used to add elements at the end of the stack. That it is used to push elements on to a stack. The elements being pushed can be of mixed data types. Syntax: void public Ds\Stack::push ($values) Parameter: This function accepts a single parameter $values which i 1 min read D3.js queue() Function The d3.queue() function is used to create a queue of a specified size. If the size is not given by default it is taken as infinite. Syntax: d3.queue(size); Parameters: This function accepts a single parameter mentioned above and described below: size: It is the optional parameter if it is not given 2 min read PHP | DsVector push() Function The Ds\Vector::push() function is an inbuilt function in PHP that is used to add elements to the end of the vector. Syntax: void public Ds\Vector::push( $values ) Parameters: This function accepts a single parameter $values which contains one or more than one element to be added to the vector. Retur 2 min read PHP SplQueue::dequeue() Function The SplQueue::dequeue() function is an inbuilt function in PHP which is used to dequeues the node from the queue. Syntax: mixed SplQueue::dequeue() Parameters: This function does not accept any parameter. Return Value: This function return the value of the dequeued node. Below programs illustrate th 1 min read PHP | usleep( ) Function The usleep() function in PHP is an inbuilt function which is used to delay the execution of the current script for specific microseconds. It is similar to the sleep() function which delays execution of the current script for a specified number of seconds, unlike the usleep() function which delays th 2 min read PHP Ds\Queue push() Function min read Like