Single quote vs Double quote in PHP
It is slightly faster to use single quotes.
This is because when you use double quotes PHP has to parse to check if there are variables in there.
So, if you do:
Whenever you are not using variables inside a string it's good practice to just use single quotes so PHP doesn't have to parse the string.
--Paolo Bergantino from Stackoverflow.com
This is because when you use double quotes PHP has to parse to check if there are variables in there.
So, if you do:
$bar = 'world';
$foo = "hello $bar";
$baz = 'hello $bar';
$foo
would contain "hello world" while $baz
could contain "hello $bar"Whenever you are not using variables inside a string it's good practice to just use single quotes so PHP doesn't have to parse the string.
--Paolo Bergantino from Stackoverflow.com