Symfony 在 __call() 方法中调用 call_user_func_array() 后宕机
Symfony goes down after call call_user_func_array() in __call() method
我有两个简单的类
Parent
class Parent {
public function __call($name, $args)
{
return call_user_func_array([$this, $name], $args);
}
}
和Child
class Child extends Parent {
private function test()
{
return 1;
}
}
当我执行 Child
对象 $child->test()
时,我的 Symfony 服务器(由 php bin/console server:run
运行)出现故障。只有消息是 [ERROR] Built-in server terminated unexpectedly.
.
方法 test()
是私有的,不能从 Parent
范围执行。使方法 protected
.
我有两个简单的类
Parent
class Parent {
public function __call($name, $args)
{
return call_user_func_array([$this, $name], $args);
}
}
和Child
class Child extends Parent {
private function test()
{
return 1;
}
}
当我执行 Child
对象 $child->test()
时,我的 Symfony 服务器(由 php bin/console server:run
运行)出现故障。只有消息是 [ERROR] Built-in server terminated unexpectedly.
.
方法 test()
是私有的,不能从 Parent
范围执行。使方法 protected
.