title: Uninformed parameter in a PHP function
body: <p>I have this simple function in PHP:</p>
  
  <pre><code>function formatDateTime($lang) {
      if(!isset($lang)) { $lang == 'en'; }
  
      if($lang == 'fr') { ... }
      if($lang == 'en') { ... }
  }
  </code></pre>
  
  <p>Depending on my needs, I sometimes call this function like this:</p>
  
  <pre><code>function formatDateTime('en');
  </code></pre>
  
  <p>or sometimes like this (without an argument):</p>
  
  <pre><code>function formatDateTime('');
  </code></pre>
  
  <p>When I call the function with an argument (i.e.: <code>en</code>), it works. But if I do not pass any argument it can't enter into the condition <code>if(!isset($lang)) { ... }</code>.</p>
  
  <p>What am I missing here?</p>