Search code examples
phppythonvariadic-functionslanguage-comparisons

What is Python's *Args and **kwargs equivalent in PHP?


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


Solution

  • 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