- set_error_handler: documentation ( source)
<?php
set_error_handler(function () {
throw new Exception("foo");
});
class MyArrayAcess implements ArrayAccess {
public function offsetExists(mixed $offset): mixed {}
public function offsetGet(mixed $offset): mixed {}
public function offsetSet(mixed $offset, mixed $value): void {}
public function offsetUnset(mixed $offset): void {}
}