this code prints “no” , but it should print “ok” and utf8 encodes of two are different
$a="کیهان";
$b="كيهان";
echo utf8_encode($a)."==".utf8_encode($b)."<br>";
if(utf8_encode($a)==utf8_encode($b))
echo "ok";
else
echo "no";
and the result :
Ú©ÛÙØ§Ù==ÙÙÙØ§Ù
no
what’s that © ?
edit : $a is copied and $b is typed
your unicode strings are different to begin with… shown here with spaces to hilight the point:
EDIT: for curiosity’s sake…
Seems that they display identically in the tab at the top of the file, which must have font features which combine characters together, but displays differently in the body of code, where it is actually displayed back to front.