3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $obj->bar = "xyz"; echo $obj->{${'data'}[$key]},"\n"; echo "{$obj->{${'data'}[$key]}}\n";
based on 9mkrR
Output for 7.1.0 - 7.2.0
Warning: Creating default object from empty value in /in/rCEWn on line 3 Notice: Undefined variable: data in /in/rCEWn on line 5 Notice: Undefined variable: key in /in/rCEWn on line 5 Notice: Undefined property: stdClass::$ in /in/rCEWn on line 5 Notice: Undefined variable: data in /in/rCEWn on line 7 Notice: Undefined variable: key in /in/rCEWn on line 7 Notice: Undefined property: stdClass::$ in /in/rCEWn on line 7
Output for 7.0.0 - 7.0.20
Warning: Creating default object from empty value in /in/rCEWn on line 3 Notice: Undefined variable: data in /in/rCEWn on line 5 Notice: Undefined variable: key in /in/rCEWn on line 5 Fatal error: Uncaught Error: Cannot access empty property in /in/rCEWn:5 Stack trace: #0 {main} thrown in /in/rCEWn on line 5
Process exited with code 255.
Output for 5.4.11 - 5.6.28
Warning: Creating default object from empty value in /in/rCEWn on line 3 Notice: Undefined variable: data in /in/rCEWn on line 5 Notice: Undefined variable: key in /in/rCEWn on line 5 Fatal error: Cannot access empty property in /in/rCEWn on line 5
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Strict Standards: Creating default object from empty value in /in/rCEWn on line 3 Notice: Undefined variable: key in /in/rCEWn on line 5 Notice: Undefined variable: data in /in/rCEWn on line 5 Fatal error: Cannot access empty property in /in/rCEWn on line 5
Process exited with code 255.