Sure I have $str, Here's the full function to see what I mean
class utf8
{
public function Check($str)
{
return (preg_match('/(?:[^\x00-\x7F])/', $str) !== 1);
}
public function seotitle ()
{
if ($this->Check("dasdasdads")
{
echo 'utf8';
}
}
}
If you tried to use var_dump it will give you always boolen true if it was a correct UTF8 or not.
Here's a UTF-8 word to test "تجربة"