【发布时间】:2012-02-07 01:28:49
【问题描述】:
两者有什么区别:
$callback = array(&$this, 'method');
$callback[0]->$callback[1]($args);
和
call_user_func(array(&$this, 'method'), $args);
?
【问题讨论】:
-
第一个相当于:$x='method'; $this->$x($args);但是因为它在运行时处理函数名,所以它必须使用 call_user_func