简单的回答。不,你不能。
您可以尝试通过传入对象/数组或使用其他依赖注入模式来绕过它。
此外,尝试使用空值而不是空字符串,因为使用iSnull()测试它们的存在更为明确。
如:
function test ($a=null,$b=null,$c=null){
if (is_null($a) {
//do something about $a
}
if (is_null($b) {
//do something about $b
}
if (is_null($c) {
//do something about $c
}
}
叫这个:
test(null,null,"Hello");