- Output for 5.4.2 - 5.4.45, 5.5.24 - 5.5.29, 5.6.7 - 5.6.13
- Parse error: syntax error, unexpected '(', expecting '{' in /in/KdbsQ on line 7
Process exited with code 255.
<?php
function demo(callable $callback)
{
$callback();
}
class A ()
{
function great($name) {
return 'Hello ' . $name;
}
}
demo(new class ("Monde") extends A {
public function __invoke() {
echo $this->greate('world');
}
});