In PHP strings, the backslash is an escape character, so you need to use two backslashes of you want to use a backslash in your string.
Now officially you only have to do this with strings in double quotes, and not for strings in single quotes.
However, it is our coding convention to do it everywhere to avoid confusion and mistakes.