public function key()
    {
        if (!$this->valid()) {
            return null;
        }

        if ($this->mode & self::KEY_AS_KEY) {
            return parent::key();
        }

        return $this->cursor;
    }
public function key()
    {
        if (!$this->valid()) {
            return null;
        }

        if ($this->mode & self::KEY_AS_KEY) {
            return parent::key();
        }

        return $this->cursor;
    }
public function key ( ) { if ( ! $ this -> valid ( ) ) { return null ; } if ( $ this -> mode & self :: KEY_AS_KEY ) { return parent :: key ( ) ; } return $ this -> cursor ; }
Returns the current position.

@return int The current position.
Returns the current position .