The left hand side of = has to be a variable . $var is a variable , whereas !$var is not (it's an expr_without_variable ).

Thus PHP parses the expression in the only possible way, namely as !($var = getVar()) . Precedence never comes to play here.

An example of where the the precedence of = is relevant is this: