Single-quoted strings will not contain variables or escape sequences expanded by the interpreter, while double-quoted strings will look at other output:
$foo = 'bar'; echo 'This is a $foo'; echo "This is a $foo";
Single-quoted strings are therefore marginally “better” to use, because the interpreter does not need to check the contents of the string for variable references.
Gavin ballard
source share