hphp/hack/manual/apis/Interfaces/IndexAccess/index.md
:::info[Note] This is a point-in-time snapshot of the API documentation from January 2026. Going forward, we will not be maintaining a public copy of these references, and recommend users to refer to the built-in signature helpers available in the Hack LSP instead for complete and up-to-date information. :::
The interface for mutable, keyed collections to enable setting and removing keys
interface IndexAccess implements ConstIndexAccess<Tk, Tv> {...}
->removeKey(Tk $k): this->set(Tk $k, Tv $v): this->setAll(?KeyedTraversable<Tk, Tv> $traversable): thisTraversable, stores a value into the
current collection associated with each key, overwriting the previous value
associated with the keyConstIndexAccess)->at(Tk $k): Tv->containsKey(mixed $k): bool->get(Tk $k): ?Tv