3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class foo { var $bar = 'I am bar.'; } $foo = new foo(); $bar = 'bar'; $baz = array('foo', 'bar', 'baz', 'quux'); echo "{$foo->$bar}\n"; echo "{$foo->{$baz[1]}}\n";
based on 7Kqpn
Output for 5.5.0 - 7.2.6
I am bar. I am bar.