PHP 中的参数转发
考虑以下函数:
function debug() {
$args = func_get_args();
// process $args
}
function debug_die() {
// call debug() with the passed arguments
die;
}
方法 debug_die
在调用采用可变数量参数的 debug
后退出。
因此,传递给 debug_die
的参数仅用于 debug
,并且只需转发。如何在 debug_die
方法中完成此操作?
Consider the following functions:
function debug() {
$args = func_get_args();
// process $args
}
function debug_die() {
// call debug() with the passed arguments
die;
}
The method debug_die
exits after calling debug
that takes a variable number of arguments.
So the arguments passed to debug_die
as such are meant for debug
only and just have to be forwarded. How can this be done in the debug_die
method?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)