Quoting strings: what do YOU do?
As you all probably know, there are different types of string quoting in PHP.
Let's start with single quote vs double quote:
The double quotes replace variables with the value of the variables within the strings, while the single quotes don't.
$bar = "foo";
print "hello $bar"; // prints "hello foo"
print 'hello $bar'; // prints "hello $bar"
The result of all three statements is the same, but the interpreter doesn't see it thay way. The last one (print test;) is definitely the worst, because the compiler will first have to check if 'test' is a defined constant, and only after it figures out this isn't the case, will it print the string "test".
print "test"; // prints "test"
print 'test'; // also prints "test"
print test; // assuming 'test' is not defined as a constant, also prints "test"
The first example (print "test";) also isn't great, because the interpreter has to scan the whole string for occurrences of variables. For this short string this isn't any problem, but for larger strings it might become noticeable.
For these reason I personally ALWAYS stick to single quotes.
What do you use?