public function __destruct() { if (is_resource($this->lock)) { fclose($this->lock); } printf("TIME: %s\n", Formater::msec(microtime(true) - $this->time)); printf("RAM: %s\n", Formater::size(memory_get_peak_usage(true))); }
public function __destruct() { if (!is_null($this->log)) { if (empty($_SERVER['QUERY_STRING'])) { $this->log->debug("{$_SERVER['REQUEST_METHOD']} {$_SERVER['REQUEST_URI']} {$_SERVER['SERVER_PROTOCOL']}"); } else { $this->log->debug("{$_SERVER['REQUEST_METHOD']} {$_SERVER['REQUEST_URI']}?{$_SERVER['QUERY_STRING']} {$_SERVER['SERVER_PROTOCOL']}"); } $this->log->debug('TIME: ' . Formater::msec(microtime(true) - $this->time)); $this->log->debug('RAM: ' . Formater::size(memory_get_peak_usage(true))); } }