3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<? $a = new AAA; class AAA { public function render($datum) { echo " a volame callback"; echo "datum" . $datum; } } function Jmeno($name, $callback) { $lokalniPrommena = "v " . date("H:i:s"); echo "Ahoj $name <br />"; $callback($lokalniPrommena); } Jmeno('Romanek', $a->render); ?>
Output for 7.0.0 - 7.1.0
Notice: Undefined property: AAA::$render in /in/CqrkO on line 28 Ahoj Romanek <br /> Fatal error: Uncaught Error: Function name must be a string in /in/CqrkO:25 Stack trace: #0 /in/CqrkO(28): Jmeno('Romanek', NULL) #1 {main} thrown in /in/CqrkO on line 25
Process exited with code 255.
Output for hhvm-3.12.0
Notice: Undefined property: AAA::$render in /in/CqrkO on line 28 Ahoj Romanek <br /> Fatal error: Uncaught Error: Function name must be a string in /in/CqrkO:25 Stack trace: #0 /in/CqrkO(28): Jmeno() #1 {main}
Process exited with code 255.
Output for 5.4.0 - 5.6.28, hhvm-3.10.0
Notice: Undefined property: AAA::$render in /in/CqrkO on line 28 Ahoj Romanek <br /> Fatal error: Function name must be a string in /in/CqrkO on line 25
Process exited with code 255.
Output for 4.3.0 - 5.3.29
<? $a = new AAA; class AAA { public function render($datum) { echo " a volame callback"; echo "datum" . $datum; } } function Jmeno($name, $callback) { $lokalniPrommena = "v " . date("H:i:s"); echo "Ahoj $name <br />"; $callback($lokalniPrommena); } Jmeno('Romanek', $a->render); ?>