Re: Re: Print or Echo takes lots of time

From: Date: Tue, 26 Sep 2006 23:03:55 +0000
Subject: Re: Re: Print or Echo takes lots of time
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-242257@lists.php.net to get a copy of this message
On Tue, September 26, 2006 4:08 am, Colin Guthrie wrote: > Google Kreme wrote: >> On 25 Sep 2006, at 06:11 , Sancar Saran wrote: >>> $strPage = "<html> yada dayda"; >>> ... >>> $strPage.= " another html tags"; >>> ... >>> $strPage.= getSqlDataAndCreateSomeHtmlCOde(); >> >> If this is generating hundred of K of HTML, use ' instead of " >> >> (yes, it's faster). > > In this example tho', it is not the string processing that is taking > up > the time. The $ expansion etc. will be done when building the string > $strPage, not at the echo stage which is where the OP is seeing the > delay. Plus it's "faster" in such a marginal sense that you'd have to be doing zillions in a very tight loop to measure it. Benchmark it for yourself and see. -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#242257) next »