<big id="5i4ey"><dfn id="5i4ey"><table id="5i4ey"></table></dfn></big>
    <small id="5i4ey"></small>
    <var id="5i4ey"><strong id="5i4ey"></strong></var>
  • <small id="5i4ey"><ul id="5i4ey"></ul></small>
  • Ds\Queue::pop

    (PECL ds >= 1.0.0)

    Ds\Queue::popRemoves and returns the value at the front of the queue

    說明

    public Ds\Queue::pop(): mixed

    Removes and returns the value at the front of the queue.

    參數(shù)

    此函數(shù)沒有參數(shù)。

    返回值

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

    錯(cuò)誤/異常

    UnderflowException if empty.

    范例

    示例 #1 Ds\Queue::pop() example

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

    $queue->push("a");
    $queue->push("b");
    $queue->push("c");

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

    以上例程的輸出類似于:

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