public function diff($array, $compareKeys = false)
    {
        if ($this->isInstanceOf($array, $this)) {
            $array = $array->val();
        } else {
            if (!$this->isArray($array)) {
                throw new ArrayObjectException(ArrayObjectException::MSG_INVALID_PARAM, [
                    '$array',
                    'array, ArrayObject'
                ]);
            }
        }

        if ($compareKeys) {
            $this->val(array_diff_assoc($this->val(), $array));

            return $this;
        } else {
            $this->val(array_diff($this->val(), $array));

            return $this;
        }
    }