Re: [rfc] new coding standar rules
| From: | Jon Parise | Date: | Fri, 21 Dec 2001 15:34:51 +0000 |
| Subject: | Re: [rfc] new coding standar rules | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-3657@lists.php.net to get a copy of this message | ||
On Fri, Dec 21, 2001 at 08:28:19AM +0100, Alexander Skwar wrote:
> But how about ANDs and ORs in control structures?
>
> if ('a'==$a&&$b>=-2)
>
> or (my preference):
>
> if ('a' == $a && $b >= -1)
>
> ie. spaces before every "comparison"/operator.
I prefer the second style, too, although I generally tend to
write:
if (('a' == $a) && ($b >= -1))
--
Jon Parise (jon@csh.rit.edu) . Information Technology (2001)
http://www.csh.rit.edu/~jon/ : Computer Science House
Member