php escaping in single-quotes

just discovered this strange behaviour in php, quite irritating actually:

echo ‘\\.’."\n";
echo ‘\.’."\n";

output:

\.
\.

to get two backslashes while using single-quotes, you need to do the following

echo ‘\\\.’."\n";