3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class foo { var $bar = 'okok'; } $arr = array(0 => 'bar'); $f = new foo(); echo $f->$arr[0]; // php7 // < php7 'okok'
based on ghNUc
Output for 7.0.0 - 7.2.0
Notice: Array to string conversion in /in/vHe5F on line 6 Notice: Undefined property: foo::$Array in /in/vHe5F on line 6
Output for 5.3.19 - 5.6.28
okok