Re: PEAR CS poll

From: Date: Fri, 08 Oct 2004 21:51:32 +0000
Subject: Re: PEAR CS poll
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-33717@lists.php.net to get a copy of this message
Ian Eure wrote:
There are a few things which aren't covered by PEAR's CS. I'd like to get the concensus of the PEAR dev community on these things. * String concatenation. 1) "foo" . "bar" 2) "foo"."bar" 3) other (please describe)
3) preferably 1, but sometimes 2 is necessary when the lines would otherwise go over 80 cols. I'm not sure, though, that this is necessary to define. I'd prefer an 80 cols rule - with exeptions only where absolutely necessary :) I agree with the others about single quotes. For one thing, it makes it easier to read as there are less escaped characters. Also, I prefer having the variables outside of the quotes, especially when they are complex (e.g., $this->_myPrivateVariable, or even $this->getRealName($username)). But while the results of this vote my indicate a guideline for coding, I don't think it should be added to the CS section of the manual, as we don't want to put unecessary stuff in there.
* Assigning by reference. 1) $foo = &$bar; 2) $foo =& $bar; 3) other (please describe)
This only is valid for php4. php5, of course, returns a reference by default. That said... 2) please :) And this one doesn't need to be added to the manual, as it will soon be outdated. Klaus

« previous php.pear.dev (#33717) next »