3v4l.org

run code in 300+ PHP versions simultaneously
<?php $object = new ArrayObject(); $object['foo'] = 'bar'; var_dump(array_key_exists('foo', $object));
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.25, 8.4.1 - 8.4.12
Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, ArrayObject given in /in/B4ZhS:5 Stack trace: #0 {main} thrown in /in/B4ZhS on line 5
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/B4ZhS on line 5 bool(true)
Output for 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.26
bool(true)

preferences:
151.74 ms | 409 KiB | 5 Q