call_user_func() 函数问题

sdm201101 2011-10-15 02:28:45
这几天在研究个框架,发现一个语句理解不了
请问:call_user_func($arr);这个函数在接受下面的数组传参后能实现什么功能

$arr=array(2) { [0]=> object(indexClass)#3 (7) {
["_modelsHome:protected"]=> NULL
["_viewsHome:protected"]=> NULL
["_configInc:protected"]=> NULL
["_tplExt:protected"]=> string(8) ".tpl.php"
["_keys:protected"]=> array(0) { }
["_error:protected"]=> NULL
["view"]=> object(Of_View)#4 (4) {
["pageViewVarQuote:private"]=> array(1) {
["editionInBanner"]=> &array(2) {
["oexam"]=> array(2) {
["edition"]=> string(5) "1.5.2"
["date"]=> string(10) "2011-07-03"
}
["otraining"]=> array(2) {
["edition"]=> string(5) "2.2.1"
["date"]=> string(10) "2011-07-03"
}
}
}
["_basePath:protected"]=> string(0) ""
["_widgetsHome:protected"]=> string(0) ""
["editionInBanner"]=> &array(2) {
["oexam"]=> array(2) {
["edition"]=> string(5) "1.5.2"
["date"]=> string(10) "2011-07-03"
}
["otraining"]=> array(2) {
["edition"]=> string(5) "2.2.1"
["date"]=> string(10) "2011-07-03"
}
}
} //arr[view]
} //arr[0]
[1]=> string(5) "index"
}


call_user_func($);执行?????
...全文
154 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
ci1699 2011-10-16
  • 打赏
  • 举报
回复
楼主把代码贴出来啊。

这样打印看晕人啊
r3r4r8 2011-10-15
  • 打赏
  • 举报
回复
分分分分分分
ohmygirl 2011-10-15
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 sdm201101 的回复:]
就告诉我 执行过程就行, 是执行indexclass 函数吗 吧index参数传给它
[/Quote]

indexClass不是个函数,是个对象,可能存在一个indexclass类(控制器)和一个index方法(action)。
这些都是猜测,不看函数的话。很难猜出来是干嘛的。
sdm201101 2011-10-15
  • 打赏
  • 举报
回复
就告诉我 执行过程就行, 是执行indexclass 函数吗 吧index参数传给它
ohmygirl 2011-10-15
  • 打赏
  • 举报
回复
你只给参数了,没有给函数体,怎么知道他是做什么的呢。

21,886

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧