Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 502
HayashiEsme Avatar asked Jan 05 '17 05:01

HayashiEsme


1 Answers

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

like image 151
justrohu Avatar answered Oct 22 '22 13:10

justrohu