variable number of method arguments: indication practice
Posted: Thu Aug 28, 2008 12:51 pm
A certain method or function has a variable number of arguments. What is a good practice to code this so code hinting will be clear for everyone?
example:
setVars($fixedVar, $optionalVar1 = null, $optionalVar2 = null)
This will make it clear, I think, how I'm expecting the arguments are given.
example:
setVars($fixedVar, $optionalVar1 = null, $optionalVar2 = null)
This will make it clear, I think, how I'm expecting the arguments are given.