coding-standards
coding-standards copied to clipboard
Escaping \ in strings
The rules for single quoted and double quoted strings differ a bit on the specifics but, in both cases, \\ is an escaped backslash but \ followed by any character that does not need to be escaped is a literal backslash. I think this can easily lead to confusion and I would suggest that the standards should require all backslashes to be escaped whether it is strictly required by PHP or not.
Yes? No? Maybe?