Home > Archive > PHP PEAR Questions and Answers > February 2006 > Re: [PEAR-QA] Breaking long lines
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: [PEAR-QA] Breaking long lines
|
|
| Alan Knowles 2006-02-13, 3:57 am |
| Ludvig Ericson wrote:
>Hi, I'm just wondering - I'm not really fond of breaking PHP lines in
>weird places because the PEAR standards tell me to do so. Do I still
>have to?
>And is this acceptable if so:
><?php
> $aReallyLongVariableName = aReallyLongFunction(A_REALLY_LONG_CONSTA
NT,
> $aReallyLongArgumentName);
>?>
>(If you missed what I mean: the two spaces on the trailing line.)
>
>
Usually better to wrap to somewhere sensible..:
.....$aReallyLongVariableName = aReallyLongFunction(
.........A_REALLY_LONG_CONSTANT,
.........$aReallyLongVar
.....);
indents should be a factor of 4 spaces (As per CS) - as long as the
continuation is indented I guess it follows CS, technically...
Regards
Alan
| |
| Arnaud Limbourg 2006-02-13, 3:57 am |
| Alan Knowles wrote:
> Ludvig Ericson wrote:
>
> Usually better to wrap to somewhere sensible..:
>
> ....$aReallyLongVariableName = aReallyLongFunction(
> ........A_REALLY_LONG_CONSTANT,
> ........$aReallyLongVar
> ....);
>
> indents should be a factor of 4 spaces (As per CS) - as long as the
> continuation is indented I guess it follows CS, technically...
That is what I tend to do, I find it much more readable that way. I
guess we could add that as an example to the manual.
Arnaud.
|
|
|
|
|