Code optimization: single vs. double quotes?

From: Date: Fri, 24 Oct 2003 00:43:17 +0000
Subject: Code optimization: single vs. double quotes?
Groups: php.general 
Request: Send a blank email to php-general+get-167377@lists.php.net to get a copy of this message
I came across this post and was hoping to get a gurus opinion on the validity. TIA -Shawn I remember reading somewhere re: PHP coding that it is a better coding practice to use single quotes as much as possible vs. using double quotes in scripts. When using double quotes, you are forcing PHP to look for variables within them, even though there may not be any, thus slowing execution time... For example it is better to code: Code: echo '<td bgcolor="'.$bgcolor2.'">&nbsp;</td></tr>'; vs. Code: echo "<td bgcolor=\"$bgcolor2\">&nbsp;</td></tr>";

« previous php.general (#167377) next »