As mentioned above, you cannot skip parameters. I wrote this answer to provide some addition that was too large to post a comment.
@Frank Nocke suggests calling a function with its default parameters, therefore, for example, having
function a($b=0, $c=NULL, $d=''){
you should use
$var = a(0, NULL, 'ddd');
which will function the same as omitting the first two parameters ( $b and $c ).
It is not clear which of these are the defaults ( 0 printed to indicate the default value, or is this important?).
There is also the danger that the default problem is related to an external (or built-in) function, when the default values ββcan be changed by the author of the function (or method). Therefore, if you do not change your call in the program, you may inadvertently change its behavior.
Some workaround may be to define some global constants, such as DEFAULT_A_B , which will be the "default value for parameter B of function parameter A" and "omit" as follows:
$var = a(DEFAULT_A_B, DEFAULT_A_C, 'ddd');
For classes, this is simpler and more elegant if you define class constants because they are part of a global scope, for example.
class MyObjectClass { const DEFAULT_A_B = 0; function a($b = self::DEFAULT_A_B){
Please note that this constant is defined by default exactly once throughout the code (there is no value even in the method declaration), therefore, in case of unexpected changes, you will always supply the function / method with the correct default value.
The clarity of this solution is, of course, better than providing the original default values ββ(e.g. NULL , 0 , etc.) that tell the reader nothing.
(I agree that calling like $var = a(,,'ddd'); would be a better option)