什么是Python的* Args和** kwargs在PHP中等效? [重复]

什么是Python的* Args和** kwargs在PHP中等效?  [重复]

问题描述:

This question already has an answer here:

Lord Google isn't giving me anything besides something about declaring optional variables with a value so they can be passed into the code without giving you an error. Is there even an equivalent of *Args or **kwargs in PHP?

Cheers

</div>

此问题已经存在 这里有一个答案: p>

  • 如何将可变数量的参数传递给PHP函数 9 answers span> li> ul> div>

    Google阁下没有给我 除了用值声明可选变量之外的任何东西,所以它们可以传递给代码而不会给你一个错误。 在PHP中是否还有等效的* Args或** kwargs? p>

    干杯 p> div>

For *Args I think you want this func_num_args() please refer to this link for more http://php.net/manual/en/function.func-num-args.php

For **kwargs This feature is not supported in php