Ds\PriorityQueue::pop

Removes and returns the value with the highest priority

&reftitle.description; public `mixed` `Ds\PriorityQueue::pop`

Removes and returns the value at the front of the queue, ie. the value with the highest priority.

Values with equal priority fall back to FIFO (first in first out).

&reftitle.parameters; &no.function.parameters;
&reftitle.returnvalues;

The removed value which was at the front of the queue.

&reftitle.errors;

`UnderflowException` if empty.

&reftitle.examples;

### `Ds\PriorityQueue::pop` example

    <?php
    $queue = new \Ds\PriorityQueue();

    $queue->push("a",  5);
    $queue->push("b", 15);
    $queue->push("c", 10);

    print_r($queue->pop());
    print_r($queue->pop());
    print_r($queue->pop());
    ?>

&example.outputs.similar;

    string(1) "a"
    string(1) "b"
    string(1) "c"