The backslash is still an escape character in single-quoted strings (it comes out of single literal quotes).
This is illegal, for example (since the backslash avoids the closing quote):
$path = 'C:\';
So, \\ must match a literal backslash to avoid inadvertent escaping.
source share