返回TRUE是否字符串与另一个字符串具有相同的子字符串

I'm looking for a function that returns TRUE whether a string has the same substrings of another, for instance:

function ("hi tomorrow is Friday", "tomorrOW is friday HI);

should return TRUE;

it also has to be case insensitive.

Thanks

function check_substr_exist($str1,$str2)
{
$count = false;
$arr = explode(" ",$str2);

foreach ($arr as $val)
{
   if(stripos($str1, $val) !== false)
   {
       $i=true;
   }
}

return $i;

}

echo  check_substr_exist("hi tomorrow is Friday", "tomorrOW is friday HI");