3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $key = 1; $obj = new stdClass; $obj->$key = 'val'; $arr = (array) $obj; var_dump($arr); var_dump($key); var_dump(isset($arr[$key]));
based on XSCZJ
Output for 7.2.0 - 7.3.0rc6
array(1) { [1]=> string(3) "val" } int(1) bool(true)
Output for 5.5.0 - 7.1.20
array(1) { ["1"]=> string(3) "val" } int(1) bool(false)