Home  >  Article  >  Backend Development  >  php 方法形参没有传怎么判断

php 方法形参没有传怎么判断

WBOY
WBOYOriginal
2016-06-02 11:29:081493browse

形参php函数

call_user_func_array(array($obj, $function), $receive_data);
我调用的$function方法若需要二个参数。此是我$receive_data为空。php运行会报错。
怎么事先判断$function函数需要参数。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn