You need to put $var2 and $var3 at the end of the parameter list
function basicFunction ( $var1, $var4 = 5, $var2 = 1, $var3 = 2)
Now you can call:
basicFunction( 0, 3);
Otherwise you will have to specify all of the parameters. When calling functions, you must specify all of the parameters from left to right. The only time you can omit parameters is:
- If the parameter you want to omit has a default value.
- All of the parameters to the right of the current parameter have default values.