, , , .
, :
function doStuff($var1, $var2 = false) {
}
Then call the function as follows:
doStuff("thing1");
Just like calling it like this:
doStuff("thing1", false);
In addition, a small clarification on your question: the operator is =not an "equal sign". This is actually an "assignment operator". To test equality in PHP, you use ==(or ===, if you want the types to be the same, not just the values).
source
share