Is passing NULL param exactly the same as passing no param
- by park
I'm 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 $p5 to pass, but for the sake of consistency I still want to pass something like NULL. So my question, does PHP treat passing a NULL exactly the same as not passing anything?
somefunc($p1, $p2, $p3, $p4 = SOM_CONST);
somefunc($p1, $p2, $p3, $p4 = SOM_CONST, NULL);