3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Demo { public $a = 123; } $b = new Demo(); echo $b->$a;
based on vCYj0
Output for 7.1.0 - 7.3.0beta1
Notice: Undefined variable: a in /in/c6kFN on line 9 Notice: Undefined property: Demo::$ in /in/c6kFN on line 9
Output for 7.0.0 - 7.0.20
Notice: Undefined variable: a in /in/c6kFN on line 9 Fatal error: Uncaught Error: Cannot access empty property in /in/c6kFN:9 Stack trace: #0 {main} thrown in /in/c6kFN on line 9
Process exited with code 255.
Output for 5.5.0 - 5.6.28
Notice: Undefined variable: a in /in/c6kFN on line 9 Fatal error: Cannot access empty property in /in/c6kFN on line 9
Process exited with code 255.