As most things, they have pro and cons.
a) Is better because if you miss a '=' sign it'll fail
b) Is better because it is more readable.
A good compiler/interpreter will issue a warning if variable are changed in tests, unless you use a double set of parentheses.
I will, like most people, use b) because:
* It is readable, which is of paramount importance when you write code in scripting languages
* By using a language that create variables on the go, you have already showed total disregard to error checking (ie: if you write "if (true==$varable)" the code will fail silently), so rendering the code unreadable to guard against a comparatively rare error is useless.