I am working with a function whose signature looks like this:
afunc(string $p1, mixed $p2, array $p3 [, int $p4 = SOM_CONST [, string $p5 ]] )
In some cases, I donโt have data for the last parameter of $p5 , but for approval I still want to pass something like NULL . So my question is, does PHP handle NULL passing in the same way that it doesnโt miss anything?
somefunc($p1, $p2, $p3, $p4 = SOM_CONST); somefunc($p1, $p2, $p3, $p4 = SOM_CONST, NULL);
function parameter-passing php parameters optional-parameters
park
source share