Can someone explain why all this code works normally if PHP is only supposed to support a 256-character set?
I know that Content-Type tag interpret these characters if is on UTF-8.
But why PHP work it?
echo "匝";
if (preg_match('/啊/', "啊"))
echo "Match";
if (preg_match('/\w/', "啊"))
echo "Match";
Compare your code to:
regex
/\w/works because your multibyte char contains of 2 bytes: 0x53 and 0x1D. And first one, 0x53 looks like a valid single-byte charSPS: this is valid way to match one multibyte letter: