Re: OR
| From: | -{ Rene Brehmer }- | Date: | Sun, 25 Apr 2004 14:00:38 +0000 |
| Subject: | Re: OR | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-184559@lists.php.net to get a copy of this message | ||
According to historical records, on Sun, 25 Apr 2004 17:14:13 +1000 Aidan
Lister wrote about "[PHP] OR":
>if (cond || cond2)
>
>OR
>
>if (cond OR cond2)
>
>
>What do you use, and why?
I always use ||
basically because to me it's easier to read in more complex statements ...
like this:
if ((($del_own == 1 && $post_userID == $userID) || $del_other == 1) &&
($postID != $first_postID || $del_thread == 1)) {
I always stick to the symbols ... just easier ...
|| && |! &!
^ being OR, AND, NOR, and NAND (believe NOR is actually called XOR, can't
remember ...)
Rene
--
Rene Brehmer
aka Metalbunny
~ If you don't like what I have to say ... don't read it ~
http://metalbunny.net/
References, tools, and other useful stuff...
Check out the new Metalbunny forums at http://forums.metalbunny.net/