<?php
class foo {
function baz() {
return __CLASS__;
}
}
class bar {
function baz() {
return __CLASS__;
}
}
$call = [new bar, "parent::baz"];
call_user_func($call);
Fatal error: Uncaught TypeError: call_user_func(): Argument #1 ($callback) must be a valid callback, cannot access "parent" when current class scope has no parent in /in/t03sQ:16
Stack trace:
#0 {main}
thrown in /in/t03sQ on line 16
Process exited with code 255.
Output for 8.0.0 - 8.0.9
Fatal error: Uncaught TypeError: call_user_func(): Argument #1 ($function) must be a valid callback, cannot access "parent" when current class scope has no parent in /in/t03sQ:16
Stack trace:
#0 {main}
thrown in /in/t03sQ on line 16
Process exited with code 255.
Warning: call_user_func() expects parameter 1 to be a valid callback, cannot access parent:: when current class scope has no parent in /in/t03sQ on line 16