Ds\Deque::shift

(PECL ds >= 1.0.0)

Ds\Deque::shiftRemoves and returns the first value

说锟斤拷

public Ds\Deque::shift ( void ) : mixed

Removes and returns the first value.

锟斤拷锟斤拷

锟剿猴拷锟斤拷没锟叫诧拷锟斤拷锟斤拷

锟斤拷锟斤拷值

The first value, which was removed.

锟斤拷锟斤拷锟届常

UnderflowException if empty.

锟斤拷锟斤拷

Example #1 Ds\Deque::shift() example

<?php
$deque 
= new \Ds\Deque(["a""b""c"]);

var_dump($deque->shift());
var_dump($deque->shift());
var_dump($deque->shift());
?>

锟斤拷锟斤拷锟斤拷锟教碉拷锟斤拷锟斤拷锟斤拷锟斤拷冢锟�

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