public function offsetExists($key) { if (is_int($key)) { return (bool) array_slice((array) $this, $key, 1); } return parent::offsetExists($key); }