3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php //Enter your code here, enjoy! $data = new stdClass(); $data->test_img = 'asd'; $v = ['test_img']; var_dump($data->$v[0]);
based on WBHcR
Output for 7.0.0 - 7.2.0
Notice: Array to string conversion in /in/1RTbc on line 9 Notice: Undefined property: stdClass::$Array in /in/1RTbc on line 9 NULL
Output for 5.4.11 - 5.6.28
string(3) "asd"
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/1RTbc on line 8
Process exited with code 255.