Deprecated: Return type of MyArrayObject::offsetExists($x) should either be compatible with ArrayObject::offsetExists(mixed $key): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/DJH6M on line 20
Deprecated: Return type of MyArrayObject::offsetGet($x) should either be compatible with ArrayObject::offsetGet(mixed $key): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/DJH6M on line 10
Deprecated: Return type of MyArrayObject::offsetSet($x, $v) should either be compatible with ArrayObject::offsetSet(mixed $key, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/DJH6M on line 6
offsetSet('hello')
offsetSet('hi')
offsetGet('hello')
Notice: Indirect modification of overloaded element of MyArrayObject has no effect in /in/DJH6M on line 28
offsetGet('a')
Fatal error: Uncaught Error: Attempt to assign property "b" on null in /in/DJH6M:29
Stack trace:
#0 {main}
thrown in /in/DJH6M on line 29
Process exited with code 255.
Output for 8.0.0 - 8.0.30
offsetSet('hello')
offsetSet('hi')
offsetGet('hello')
Notice: Indirect modification of overloaded element of MyArrayObject has no effect in /in/DJH6M on line 28
offsetGet('a')
Fatal error: Uncaught Error: Attempt to assign property "b" on null in /in/DJH6M:29
Stack trace:
#0 {main}
thrown in /in/DJH6M on line 29
Process exited with code 255.
offsetSet('hello')
offsetSet('hi')
offsetGet('hello')
Notice: Indirect modification of overloaded element of MyArrayObject has no effect in /in/DJH6M on line 28
offsetGet('a')
offsetGet('a')
Notice: Undefined index: a in /in/DJH6M on line 12
Warning: Creating default object from empty value in /in/DJH6M on line 30
Notice: Undefined property: stdClass::$b in /in/DJH6M on line 30
Output for 7.3.32 - 7.3.33
offsetSet('hello')
offsetSet('hi')
offsetGet('hello')
offsetGet('a')
offsetGet('a')
Warning: Creating default object from empty value in /in/DJH6M on line 30
offsetSet('hello')
offsetSet('hi')
offsetGet('hello')
Notice: Indirect modification of overloaded element of MyArrayObject has no effect in /in/DJH6M on line 28