Passing unset variables to functions
My code: function Check($Variable, $DefaultValue) { if(isset($Variable) && $Variable != "" && $Variable != NULL) { return $Variable; } else { return $DefaultValue; } } $a = Check(@$foo, false); $b = Check(@$bar, "Hello"); //$a now equals false because $foo was not set. //$b now equals "Hello" because $bar was not set. When a variable doesn't exist and is passed to the function (suppressing the error) what is actually passed? Is there any undefined behaviour that this function could exhibit? Is there a better way of wrapping the testing for variable existence and supplying a default value from