An offset to check for.
The return value will be casted to boolean if non-boolean was returned.
public function offsetExists($offset) { if (is_scalar($offset)) { return array_key_exists($offset, $this->scalarStore); } if (is_object($offset)) { return $this->objectStore->offsetExists($offset); } if (is_array($offset)) { foreach ($this->arrayKeys as $index => $entry) { if ($entry === $offset) { $this->lastArrayKey = $offset; $this->lastArrayValue = $this->arrayValues[$index]; return true; } } } return false; }