title: Does a simple `return` in a PHP function simply end the function prematurely?
body: <p>I have just seen this</p>
  
  <pre><code>// Check to see if the request is a XHR call    
  if (request::is_ajax())
  {
    // Send the 403 header
    header('HTTP/1.1 403 Forbidden');
    return;
  }
  </code></pre>
  
  <p>I have not seen a simple <code>return</code> before, and I have never used it. My only guess is that it simply acts the same as any <code>return 'something'</code> (halting the function), except doesn't actually return a result.</p>
  
  <p>Furthermore, what would happen in this situation?</p>
  
  <pre><code>function text($var)   
  {
      if ( ! $var) {
          return;
      }
      do_something();
  }
  
  $var = text('');
  </code></pre>
  
  <p>I know it's a bad example (it should probably return false or throw an exception), but would it be an error, or would the <code>$var</code> simply be null or blank?</p>