One of them thinks it should go at the beginning and the other thinks it should go at the end? Right?
–
RookMar 15 '11 at 22:49

One of them thinks it should go at the beginning and the other thinks it should go at the end, when in fact there must be no concatenation character at all, since PHP enables to write strings on multiple lines.
–
MainMaMar 15 '11 at 23:14

@MainMa but then you get a new line character in the string, which may not be what you want. So sometimes you need a concatenation character.
–
JamesMar 16 '11 at 14:36

5 Answers
5

Just from scanning I would say that a dot at the beginning of a line give a more clear sight while scanning the left ruler of a block of text since the left side is "fixed" and the right side not. On the right side your eyes have more trouble finding the dots.

Now you have the scientifically tested answer :) (well not really... let a test group do the same test on the pieces of text reversed since you were already trained by reading the first part before the second).

+1 for the best answer. If it's an SQL query, there are multiline strings for this. If it's a source code like the one posted by edelwater, it's unreadable in both cases because of the lack of refactoring. So I don't really see where can we need such concatenation.
–
MainMaMar 16 '11 at 0:18

But this is only for multi line strings. This way you get a new line character in the string, as well as any indention. Depending on the circumstances, that may be a bad thing. So sometimes you do need a concatenation character.
–
JamesMar 16 '11 at 14:39

Placing the concatenation character (or any operator) at the beginning of the line improves readability. We scan code by focusing on the beginning of each line. When a line starts with an operator, the reader can tell that the line is a continuation of the previous statement by scanning that one character.

Long mathematical expressions are always typeset so that each new line begins with an operator. There is no reason that code should not follow this convention.

Thinking back to a bunch of page long maths equations I've seen recently that makes sense, good point.
–
JamesMar 16 '11 at 14:58

+1. And additional argument: putting dots at the beginning of line => vertically aligned => more readable and less risk of forgetting one dot (even if the IDE should detect it)
–
Frosty ZDec 2 '11 at 15:41