shift() public method

Get and remove the first item from the collection.
public shift ( ) : mixed
return mixed
Beispiel #1
0
 public function testShiftReturnsAndRemovesFirstItemInCollection()
 {
     $c = new Collection(['foo', 'bar']);
     $this->assertEquals('foo', $c->shift());
     $this->assertEquals('bar', $c->first());
 }