diff --git a/src/common.php b/src/common.php
index d7b7d08..b74b846 100644
--- a/src/common.php
+++ b/src/common.php
@@ -19,12 +19,16 @@ use Query\{ConnectionManager, QueryBuilderInterface};
 /**
  * Global functions that don't really fit anywhere else
  */
-/**
- * Multibyte-safe trim function
- */
-function mb_trim(string $string): string
+
+if ( ! function_exists('mb_trim'))
 {
-	return preg_replace('/(^\s+)|(\s+$)/u', '', $string);
+	/**
+	 * Multibyte-safe trim function
+	 */
+	function mb_trim(string $string): string
+	{
+		return preg_replace('/(^\s+)|(\s+$)/u', '', $string);
+	}
 }
 
 /**