PHP中的函数已弃用,现在应该使用什么? [英] Function in PHP deprecated, what should I use now?
本文介绍了PHP中的函数已弃用,现在应该使用什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在一个班上有这段代码
I have this code in one of my classes
public function __call($method, $args) {
array_unshift($args, $method);
call_user_method_array('view', $this, $args);
}
此后,我们已经切换了服务器,它们必须使用PHP5的较新版本,并且我收到以下消息
We've since switched servers, and they must use a newer version of PHP5, and I get the following message
Function call_user_method_array() is deprecated
在哪里应该使用 reflection ?究竟是什么,我将如何使用它来修改上面的代码以使其正常工作?
Is there where I should use reflection? What exactly is it, and how would I use it to modify my code above to work as it used to?
推荐答案
查看全文