- Output for 5.4.0 - 5.4.45, 5.5.24 - 5.5.30, 5.6.8 - 5.6.14
- Parse error: syntax error, unexpected '$cb' (T_VARIABLE) in /in/eL4Pc on line 23
Process exited with code 255.
<?php
class CbMan
{
public function fn(callable $cb) {
echo $cb();
}
}
class Pippo
{
public function yah()
{
return "hello world";
}
}
$methods = ['yah'];
$aa = function($instance, $methods) {
return call_user_func($instance, $methods);
}
$cb = $aa($instance, $methods);
$cbman = new CbMan();
$cbman->fn($cb);