3v4l.org

run code in 300+ PHP versions simultaneously
<?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 {} }

preferences:
85.73 ms | 404 KiB | 5 Q