I need to know how can I escape the arguments which has default values in PHP? Imagine my function is:
function avg($a = 1 , $b = 2) {
return $a+$b;
}
and I want to call it in these forms:
avg(3,4); // Correct Result: 7
avg(2); // Expected result: 4
avg(,5) // Expected result: 6
How can I do the function calls above in a correct way?