public function __construct($debug) { $this->_stream = is_resource($debug) ? $debug : @fopen($debug, 'a'); register_shutdown_function(array($this, 'shutdown')); }