<?
$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 8.0.13
Warning: Undefined property: AAA::$render in /in/CqrkO on line 28
Ahoj Romanek <br />
Fatal error: Uncaught Error: Value of type null is not callable 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.
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 7.3.32 - 7.3.33
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.
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.