title: Passing unset variables to functions
body: <p><strong>My code:</strong></p>
  <pre><code>function Check($Variable, $DefaultValue) {
      if(isset($Variable) &amp;&amp; $Variable != &quot;&quot; &amp;&amp; $Variable != NULL) {
          return $Variable;
      }
      else {
          return $DefaultValue;
      }
  }
  
  $a = Check(@$foo, false);
  $b = Check(@$bar, &quot;Hello&quot;);
  
  //$a now equals false because $foo was not set.
  //$b now equals &quot;Hello&quot; because $bar was not set.
  </code></pre>
  <ol>
  <li>When a variable doesn't exist and is passed to the function (suppressing the error) what is actually passed?</li>
  <li>Is there any undefined behaviour that this function could exhibit?</li>
  <li>Is there a better way of wrapping the testing for variable existence and supplying a default value from a function?</li>
  <li>What does <code>isset()</code> check under the hood when testing a variable?</li>
  </ol>
  <hr />
  <p><strong>EDIT:</strong></p>
  <p>The default value is there to be user defined. Sometimes it will be a number, sometimes a string.</p>