public function slice($offset, $length = null, $preserveKeys = true)
    {
        if (!$this->isNumber($offset)) {
            throw new ArrayObjectException(ArrayObjectException::MSG_INVALID_PARAM, [
                '$offset',
                'integer'
            ]);
        }

        try {
            $arr = array_slice($this->val(), $offset, $length, $preserveKeys);
        } catch (\ErrorException $e) {
            throw new ArrayObjectException($e->getMessage());
        }

        $this->val($arr);

        return $this;
    }