In PHP, is it possible to get the coded parameter count?
Something like this(pseudo code):
function($a=false , $b=true){ //the $a=true... is just parameters, with default values
echo func_num_args();
echo ", ";
echo func_get_coded_params(); //how do i do this in PHP?
}
echo function(1 , 2); // output -> 2, 2
echo function(1, 2, 3, 4, 5, a, b, c); // output -> 8, 2
Is there an way/imaginary function(func_get_coded_params()) that can retrieve the default coded parameter count?
In this case, the coded parameters would be $a and $b itself which returns 2.
If i do function($a, $b, $c) it would return 3
2, 1or3, 0?