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";
Output for 7.0.0 - 7.2.0
I am bar. Notice: Array to string conversion in /in/m88aO on line 11 Notice: Undefined property: foo::$Array in /in/m88aO on line 11
Output for 5.3.18 - 5.6.28
I am bar. I am bar.