3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function hello(&$truc) { return $truc; } $class = new StdClass; $thing = new StdClass; $class->gericko = "truc"; $thing->sayHello = function(){ echo "hello";}; $sayHello = $thing->sayHello; $name = "gericko"; $nameClass = "class"; $nameThing = "thing"; echo ${$nameClass}->$name." ".$sayHello($class);
based on jqYm4
Output for 5.3.19 - 7.2.0
hellotruc