regarding the precedence, you can also use the and and or variants who have lower precendence so that you can have assignements work.
Here's a rough example with nested ifs and an else
if ($i > 1 ) { if ($a = function_that_may_fail()) { $i++; } else { $i = 1; } }
can become:
$i > 1 and $a = function_that_may_fail() and $i++ or $i = 1;
In reply to Re: if variants
by Chady
in thread if variants
by apotheon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |