pop() public method

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