PHP single quotes Vs double quotes

May 27, 2008 · Posted in php · 1 Comment 

Any time you put something in “double” quotes, you are asking PHP interpreter to check that content for a variable. So even though the line do not contain variables within the double quotes, PHP will waste precious computing time scanning them anyway.

$sql = 'select * from employee';

will be much faster than

$sql = "select * from employee";