shift() public method

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