The Ds\PriorityQueue::push() Function in PHP is used to push or insert values in a PriorityQueue instance. This function pushes values along with a given priority in the PriorityQueue.
void public Ds\PriorityQueue::push($value, $priority)
Parameters: This function accepts two parameters:
- $value: This is the value to be inserted in the PriorityQueue.
- $priority: This parameter is the priority according to which the value will be arranged in the PriorityQueue.
Return Value: This function does not returns any value.
Below program illustrate the Ds\PriorityQueue::push() Function in PHP:
PriorityQueue is: Ds\PriorityQueue Object (  => Three  => Two  => One )
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.