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($o,'0'), isset($o->{0})); var_dump($o->{0}); $o->{0} = 37; var_dump(array_key_exists(0, $o), property_exists($o,'0'), isset($o->{0}));
based on dZIBg
Output for 7.2.0 - 7.3.0beta1
bool(false) bool(true) bool(true) int(42) bool(false) bool(true) bool(true)
Output for 5.3.20 - 7.1.20
bool(true) bool(false) bool(false) Notice: Undefined property: stdClass::$0 in /in/QiYTv on line 7 NULL bool(true) bool(true) bool(true)