I have a PHP function, for example:
function($foo = 12345, $bar = false){}
What I want to do is call this function with the default argument $ foo, but $ bar is set to true, for example (more or less)
function(DEFAULT_VALUE, true);
How can I do it? How to pass an argument as the default value for a function without knowing this value?
Thanks in advance!
source share