3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A{ public $fuck = 10; public $aArray = array("test" => "In Class A"); } $a = new A(); $b = ["test" => "fuck"]; echo $a->$b["test"];
based on 2HT9K
Output for 7.0.0 - 7.2.0
Notice: Array to string conversion in /in/hsm4H on line 11 Notice: Undefined property: A::$Array in /in/hsm4H on line 11
Output for 5.4.0 - 5.6.28
10
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/hsm4H on line 9
Process exited with code 255.