I have, among others, these strings: "boards/", "localhost", "mysql", "0", "1", "Testing Board", "PLAIN".
I receive them as post data from a form. Some of these can have multibyte chars, but none of the test strings used has multibyte chars.
I run them through if (!preg_match('/^./u', $str))
.
That if check mostly evaluates to false, ie the preg_match returns 1. But sometimes it evaluates to true, ie 0 from that preg_match.
The true (0) seems to come totally random. But if one of the strings evaluates to true then they all do. It's either all or none.
Do anybody have some sort of explanation to that seemingly random behavior? And maybe a solution to fix it?
Cheers Jari