public function shift()
    {
        // the reindexing is complicated to deal with through the iterator
        // so let's use the simple solution
        $arr = $this->getArrayCopy();
        $ret = array_shift($arr);
        $this->exchangeArray($arr);

        return $ret;
    }
public function shift()
    {
        // the reindexing is complicated to deal with through the iterator
        // so let's use the simple solution
        $arr = $this->getArrayCopy();
        $ret = array_shift($arr);
        $this->exchangeArray($arr);

        return $ret;
    }
public function shift ( ) { // the reindexing is complicated to deal with through the iterator // so let's use the simple solution $ arr = $ this -> getArrayCopy ( ) ; $ ret = array_shift ( $ arr ) ; $ this -> exchangeArray ( $ arr ) ; return $ ret ; }
Pops an element off the beginning of the collection

@return mixed The popped element
Pops an element off the beginning of the collection