This is a simple but tricky
Question is Is there different in following two IF Statement comparisons (Note Quotes)
if ($retry_type == 'new')
AND
if ($retry_type == "new")
I know there is difference between
printf("something $var")
AND
printf('something $var')
In your example, there's no difference.
There is one other difference besides the ability to interpolate variables, though: In a single-quoted string, the only escape sequences that mean anything are \'
and \\
. All others are ignored; for example, ' '
actually consists of a backslash and a 'n', whereas " "
is interpreted as a newline.
Nope. A string is a string.
only exception is that if you use double quotes, you can throw in $variables too.
Consider the following example:
var_dump('new' === "new");
Run it. Examine it. Answer your own question.