note 44988 deleted from language.operators by danbrown
| From: | danbrown@php.net | Date: | Fri, 30 Jan 2009 20:44:53 +0000 |
| Subject: | note 44988 deleted from language.operators by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-150010@lists.php.net to get a copy of this message | ||
Note Submitter:
----
I think warhog's note about the differing precedence between && / AND and || / OR is
worth repeating. Since && and || evaluate before the assignment operator (=) while AND and
OR evaluate after it, you can get COMPLETELY different results if you don't fully parenthesise.
I cannot imagine when it would ever be important that those two pairs have differing precedence, but
they do. And I just spent two hours discovering that the hard way because I broke my career-long
rule:
*Always fully parenthesise!*