joined:Apr 11, 2015
You can "bypass" a variable in the "argv" array (ie. using the func_get_args() function to implement variable-length argument lists).
However, if you have already declared your function with 4 "fixed" parameters then you are not really using the "argv" array (or, you don't need to use it).
It looks like you are referring to "default parameters". With default params you don't need to pass the argument in the function call. It will "default" if omitted. However, for obvious reasons, default params can only come at the end of the parameter list, otherwise it is ambiguous which argument belongs to which parameter! So, in your example, you cannot make $param2 default without making $param3 and $param4 default as well.
function myFunction($param1, $param2, $param3='foo', $param4=false)
In the above example, $param3 and $param4 are both optional in the function call, since they have defaults applied in the function signature. So, myFunction() can be called with either 2, 3 or 4 arguments. If called with just 2 args then $param3 will default to (string)'foo' and $param4 will default to (bool)false. If called with 3 args then only $param4 will default.
IMO, if a boolean param is set to default then it should always default to (bool)false. But that's by no means a standard; just best practise.