diff --git a/include/utils/utils.php b/include/utils/utils.php
index 5768bf84eb3c88eb99c50b3c50317f0f6bef0887..cae8e2a74457c23ea88de69938fc7c17444864f8 100755
--- a/include/utils/utils.php
+++ b/include/utils/utils.php
@@ -2306,15 +2306,28 @@ function lower_array(&$string){
 }
 
 /* PHP 7 support */
+function php7_compat_split($delim, $str, $ignore_case=false) {
+	$splits = array();
+	while ($str) {
+		$pos = $ignore_case ? stripos($str, $delim) : strpos($str, $delim);
+		if ($pos !== false) {
+			$splits[] = substr($str, 0, $pos);
+			$str = substr($str, $pos + strlen($delim));
+		} else {
+			$splits[] = $str;
+			$str = false;
+		}
+	}
+	return $splits;
+}
+
 if (!function_exists('split')) {
-	function split($delim, $str) { return explode($delim, $str); }
+	function split($delim, $str) { return php7_compat_split($delim, $str); }
 }
 if (!function_exists('spliti')) {
 	function spliti($delim, $str) {
-		// TODO - Review backward compatibilty on use-cases.
-		$str = str_replace($delim, strtolower($delim), $str);
-		return explode(strtolower($delim), $str);
+		return php7_compat_split($delim, $str, true);
 	}
 }
 
-?>
+?>
\ No newline at end of file