内容简介:call_user_func函数详解
call_user_func函数类似于一种特别的调用函数的方法
function a($b,$c) { echo $b; echo $c; } call_user_func('a', "1","2"); call_user_func('a', "3","4"); //输出 1 2 3 4
注:a是公共方法
调用A类中的b方法并且传入参数$c
class A { function b($c) { echo $c; } } call_user_func(array("A", "b"),"111"); //输出 111 ?>
相关函数
call_user_func_array 调用回调函数,并把一个数组参数作为回调函数的参数
func_get_args() 这个函数返回的是包含当前函数所有参数的一个数组
func_get_arg() 函数返回的是指定位置的参数的值
func_num_args() 这个函数返回的是当前函数的参数数量 返回的是数字
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网
猜你喜欢:- Oracle函数 - 日期函数详解
- Java构造函数与普通函数用法详解
- golang init()函数详解
- SQL SERVER 2012新增函数之逻辑函数CHOOSE详解
- Oracle中的translate函数和replace函数的用法详解
- golang中的append函数详解
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Remote
Jason Fried、David Heinemeier Hansson / Crown Business / 2013-10-29 / CAD 26.95
The “work from home” phenomenon is thoroughly explored in this illuminating new book from bestselling 37signals founders Fried and Hansson, who point to the surging trend of employees working from hom......一起来看看 《Remote》 这本书的介绍吧!
Base64 编码/解码
Base64 编码/解码
MD5 加密
MD5 加密工具