3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $obj = new stdClass(); $obj->bar = "xyz"; $data = array("foo" => "bar"); $key = "foo"; echo $obj->$data[$key]; echo "{$obj->{$data[$key]}}";
based on TqhRO
Output for 7.0.0 - 7.2.0
Notice: Array to string conversion in /in/gdZie on line 7 Notice: Undefined property: stdClass::$Array in /in/gdZie on line 7 xyz
Output for 5.3.21 - 5.6.28
xyzxyz