Re: Code optimization: single vs. double quotes?

From: Date: Fri, 24 Oct 2003 01:40:30 +0000
Subject: Re: Code optimization: single vs. double quotes?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-167382@lists.php.net to get a copy of this message
I remember reading something very very similar from one of the main php developers.. However, for the life of me, I can't remember where it was exactly... Jordan S. Jones Shawn McKenzie wrote:
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>";
-- I am nothing but a poor boy. Please Donate.. https://www.paypal.com/xclick/business=list%40racistnames.com&item_name=Jordan+S.+Jones&no_note=1&tax=0&currency_code=USD

« previous php.general (#167382) next »