title: PHP - pass an extra parameter (variable) to set_exception_handler
body: <p>Is there any way to pass variable to the set_exception_handler() method in PHP? I need something like this:</p>
  
  <pre><code>class Clazz {
  
      public /* static */ function foo() {
          set_exception_handler(array('Clazz', 'callback'), $var); // I need to pass $var
  
           // or this in non-static context
           $that = $this;
           set_exception_handler(array($that, 'callback'), $var); // I need to pass $var
      }
  
      public static function callback($exception, $var) {
          // process $exception using $var
      }
  }
  </code></pre>