totalQueryTime += $query->time; $this->queryCount++; // error_log(sprintf( // "SQL: %s | Time: %sms", // $query->sql, // $query->time // )); }); register_shutdown_function(function () { // error_log(sprintf( // "Total Queries: %d | Total DB Time: %.2fms", // $this->queryCount, // $this->totalQueryTime // )); }); } } }