3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $class = new StdClass; $thing = new StdClass; $class->jericho = " truc"; $class->sayHello = function(){ echo "hello";}; $jerichoSayHello = $class->sayHello; $name = "jericho"; $nameClass = "class"; $sayHello = "sayHello"; echo ${${$nameClass}->$name.ucfirst($sayHello)}($class->$name);
based on HL3W8
Output for 7.0.0 - 7.2.0
Notice: Undefined variable: trucSayHello in /in/GLtm1 on line 14 Fatal error: Uncaught Error: Function name must be a string in /in/GLtm1:14 Stack trace: #0 {main} thrown in /in/GLtm1 on line 14
Process exited with code 255.
Output for 5.3.19 - 5.6.21
Notice: Undefined variable: trucSayHello in /in/GLtm1 on line 14 Fatal error: Function name must be a string in /in/GLtm1 on line 14
Process exited with code 255.