src/ArrayObject.php
public function shift()
    {
        $this->forceCollection();
        if (!$this->hasItems()) {
            throw new InvalidOffsetException('Cannot shift this array, no more items');
        }

        return $this->box(array_shift($this->data));
    }
public function shift()
    {
        $this->forceCollection();
        if (!$this->hasItems()) {
            throw new InvalidOffsetException('Cannot shift this array, no more items');
        }

        return $this->box(array_shift($this->data));
    }
public function shift ( ) { $ this -> forceCollection ( ) ; if ( ! $ this -> hasItems ( ) ) { throw new InvalidOffsetException ( 'Cannot shift this array, no more items' ) ; } return $ this -> box ( array_shift ( $ this -> data ) ) ; }
Pull the first item off the collection.
If the underlying data is not a collection, it will be converted to one.

@throws \Rexlabs\ArrayObject\Exceptions\InvalidOffsetException

@return mixed
Pull the first item off the collection . If the underlying data is not a collection it will be converted to one .