<?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 {}
}
Fatal error: During inheritance of ArrayAccess: Uncaught Exception: foo in /in/6sbhF:4
Stack trace:
#0 /in/6sbhF(7): {closure:/in/6sbhF:3}(8192, 'Return type of ...', '/in/6sbhF', 8)
#1 {main} in /in/6sbhF on line 7
Process exited with code 255.
Fatal error: During inheritance of ArrayAccess: Uncaught Exception: foo in /in/6sbhF:4
Stack trace:
#0 /in/6sbhF(7): {closure}(8192, 'Return type of ...', '/in/6sbhF', 8)
#1 {main} in /in/6sbhF on line 7
Process exited with code 255.
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Fatal error: During inheritance of ArrayAccess: Uncaught Exception: foo in /in/6sbhF:4
Stack trace:
#0 /in/6sbhF(7): {closure}(8192, 'Return type of ...', '/in/6sbhF', 8)
#1 {main} in /in/6sbhF on line 7
Process exited with code 255.
Output for 8.0.0 - 8.0.30
Output for 7.4.0 - 7.4.33
Fatal error: Declaration of MyArrayAcess::offsetExists(mixed $offset): mixed must be compatible with ArrayAccess::offsetExists($offset) in /in/6sbhF on line 8
Process exited with code 255.
Output for 7.3.0 - 7.3.33
Fatal error: Declaration of MyArrayAcess::offsetExists(mixed $offset): mixed must be compatible with ArrayAccess::offsetExists($offset) in /in/6sbhF on line 7
Process exited with code 255.