3v4l.org

run code in 300+ PHP versions simultaneously
<?php final class FilterData implements \ArrayAccess { public function offsetSet($offset, $valor) {} public function offsetExists($offset) {} public function offsetUnset($offset) {} public function offsetGet($offset) {} } array_key_exists('key', new FilterData());
Output for 8.1.0 - 8.1.34, 8.2.0 - 8.2.30, 8.3.0 - 8.3.4, 8.3.6 - 8.3.30, 8.4.1 - 8.4.18, 8.5.0 - 8.5.3
Deprecated: Return type of FilterData::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/bZrdn on line 7 Deprecated: Return type of FilterData::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/bZrdn on line 11 Deprecated: Return type of FilterData::offsetSet($offset, $valor) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/bZrdn on line 5 Deprecated: Return type of FilterData::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/bZrdn on line 9 Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, FilterData given in /in/bZrdn:15 Stack trace: #0 {main} thrown in /in/bZrdn on line 15
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 Deprecated: Return type of FilterData::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/bZrdn on line 7 Deprecated: Return type of FilterData::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/bZrdn on line 11 Deprecated: Return type of FilterData::offsetSet($offset, $valor) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/bZrdn on line 5 Deprecated: Return type of FilterData::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/bZrdn on line 9 Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, FilterData given in /in/bZrdn:15 Stack trace: #0 {main} thrown in /in/bZrdn on line 15
Process exited with code 255.
Output for 8.0.0 - 8.0.30
Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, FilterData given in /in/bZrdn:15 Stack trace: #0 {main} thrown in /in/bZrdn on line 15
Process exited with code 255.
Output for 7.4.0 - 7.4.25, 7.4.27 - 7.4.33
Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in /in/bZrdn on line 15
Output for 7.3.0 - 7.3.33, 7.4.26

preferences:
102.94 ms | 1521 KiB | 4 Q