title: Are static functions any better than globals?
body: <p>In instance where I find myself wanting to use a global variable, I often give myself permission to use a static function instead. So instead of</p>
  
  <pre><code>global $verbose;
  if ( $verbose ) { ... }
  </code></pre>
  
  <p>I do </p>
  
  <pre><code>function verbose($status = NULL) {
    static $current_status;
    if ( is_bool($status) ) {
      $current_status = $status;
    }
    return $current_status;
  }
  </code></pre>
  
  <p>This basically accomplishes the same thing; is it any better or as bad as using global variables?</p>