3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $o = (object)array(42); var_dump(array_key_exists(0, $o), property_exists(0, $o)); var_dump($o->{0});
based on 6Gfi0
Output for 7.2.0 - 7.2.6
Warning: property_exists() expects parameter 2 to be string, object given in /in/gB7Vc on line 5 bool(false) NULL int(42)
Output for 5.3.20 - 7.1.20
Warning: property_exists() expects parameter 2 to be string, object given in /in/gB7Vc on line 5 bool(true) NULL Notice: Undefined property: stdClass::$0 in /in/gB7Vc on line 7 NULL