public function splice($offset, $length = null, $replacement = array())
    {
        if (!is_int($offset)) {
            throw new InvalidArgumentException('integer', 0);
        }
        if (!is_null($length) && !is_int($length)) {
            throw new InvalidArgumentException('integer', 1);
        }
        if (!is_array($replacement) && !$replacement instanceof \ArrayAccess) {
            throw new InvalidArgumentException('integer', 2);
        }

        $array = $this->getArrayCopy();
        $spliced = array_splice($array, $offset, $length, $replacement);
        $this->exchangeArray($array);
        return $spliced;
    }