public function offsetUnset($index) { if (isset($this->data[$index])) { $this->data = substr_replace($this->data, null, $index, 1); } }