static function log_queries($limit) { if (!$limit) { self::$log_queries = false; } else { if (self::$log_queries === false) { register_shutdown_function("Dbl::shutdown"); self::$log_queries = array(); self::$log_queries_limit = $limit; } } }