if I have a function with 1 param that is default, meaning if it isn't sent in the function call it get's it's value from the value I put in the function definition- like this:
function func(a$, $b, $c=null){}
I can call this function like this:
func(1,2); //$c get's null
or
func (1,2,3) ;//$c get's 3
I'm wondering if I can add another default param to this function like -
function func($a,$b,$c=null,$d=true){}
or it can cause a mixup if I call a func with params a,b and d (the d's value can go into $c by mistake right?)
is there a way around this?