Re: speed comparison

From: Date: Mon, 18 Nov 2002 23:45:50 +0000
Subject: Re: speed comparison
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-124995@lists.php.net to get a copy of this message
I think the difference would be immeasurable, but to me, I think it would make sense if PHP didn't have to parse plain HTML... So IMHO, <HTML><BODY><?=$foo?> /should/ be slightly quicker than <? echo "<HTML><BODY>{$foo}"; ?> The general consensus on the list seems to be "go with whichever one you are more comfortable with, is more readable, and faster to write. Justin on 19/11/02 10:39 AM, Chris Edwards (chris.edwards@obinet.com) wrote: > Which would run faster and generate less load on the server, or does it > matter: > > <?php > > $output = " > <table.... > ... > ...html > > .... $name $phone ... > "; > > echo $output; > ?> > > ------ OR ------------- > > <table.... > ... > ... > <?php echo $name ?> ... <?php echo $phone ?> > .. > </table> > > I find it sucks to try and put all the php tags around stuff, so I just > include it all..... > > -- > Chris Edwards > Web Application Developer > Outer Banks Internet, Inc. > 252-441-6698 > chris.edwards@obinet.com > http://www.OuterBanksInternet.com > Justin French -------------------- http://Indent.com.au Web Developent & Graphic Design --------------------

« previous php.general (#124995) next »