coding-standards icon indicating copy to clipboard operation
coding-standards copied to clipboard

Escaping \ in strings

Open okonomiyaki3000 opened this issue 12 years ago • 1 comments

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.

okonomiyaki3000 avatar Aug 26 '13 01:08 okonomiyaki3000

Yes? No? Maybe?

okonomiyaki3000 avatar May 29 '17 08:05 okonomiyaki3000