offsetSet($keys[$i], $array[$i]); } } else { for ($i = 0; $i < $count; ++$i) { $obj->offsetSet($i, $array[$i]); } } return $obj; } #[ReturnTypeWillChange] public function offsetSet($offset, $value) { if (!is_int($value)) { throw new InvalidArgumentException('Expected an integer'); } if (is_null($offset)) { $this->container[] = $value; } else { $this->container[$offset] = $value; } } #[ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->container[$offset]); } #[ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->container[$offset]); } #[ReturnTypeWillChange] public function offsetGet($offset) { if (!isset($this->container[$offset])) { $this->container[$offset] = 0; } return (int) ($this->container[$offset]); } public function __debugInfo() { return array(implode(', ', $this->container)); } }