title: Which function should I use for testing if a var is set or not?
body: <p>I'm sometimes confused to using which one of them,</p>
  
  <p>say I have a function called <code>getmember($id)</code></p>
  
  <pre><code>function getmember($id)
  {
  
  // now this is the confusing part 
  // how do i test if a $id was set or not set?
  
  //solution 1
  if(empty($id))
  {
  return false;
  }
  
  
  // solution 2
  
  if(isset($id))
  {
  return false;
  }
  
  }
  </code></pre>
  
  <p>That's sometimes not clear to me, sometimes if a parameter in a function is set like <code>function($var="")</code></p>
  
  <p>Then I do </p>
  
  <pre><code>if($var ==="")
  {
  return false;
  } 
  </code></pre>
  
  <p>What should I use the next time <code>isset ? empty ? or ===''</code>?</p>