PHP関数func_get_args(),func_get_arg(),func_num_args()
func_get_arg
説明
パラメータ
戻り値
func_get_args
説明
パラメータ
戻り値
func_num_args
説明
パラメータ
戻り値
≪インスタンス|Instance|emdw≫
出力結果
説明
mixed func_get_arg(int $arg_num)
。
パラメータ
arg_num
。 0 。
戻り値
, FALSE。
func_get_args
説明
array func_get_args(void) 。
パラメータ
戻り値
, 。
func_num_args
説明
int func_num_args(void) 。
パラメータ
戻り値
≪インスタンス|Instance|emdw≫
";
if ($num > 2) {
echo " :".func_get_arg(1)."
";
} $arg_list = func_get_args();
foreach ($arg_list as $key => $value) {
echo " ".$key." :".$value."
";
}
}
foo(1,2,3);
echo "
";
foo(' ',' ',' ');
?>
出力結果
3
:2
0 :1
1 :2
2 :3
3
:
0 :
1 :
2 :