Setting variable values inside a function call – I don’t see this a lot, is this considered good practice?
function myUpdate($status){
...
}
myUpdate($status = 'live');
I personally like it because it’s more descriptive. I see it more frequently the other way around, ie., assigning a default value in the function definition.
That’s a very bad idea, because it’s basically code obfuscation. php does not support keyword arguments, and that can lead to weird stuff. Case in point:
This program does not only output
but also defines the variables
$band$ain the global context. This is becauseThere are a few good practices one can do to make remembering method arguments easier: