Re: Echo HTML code Verses breaking out of <?php ?>
| From: | DvDmanDT | Date: | Sat, 22 Nov 2003 01:06:42 +0000 |
| Subject: | Re: Echo HTML code Verses breaking out of <?php ?> | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-170646@lists.php.net to get a copy of this message | ||
?>HTML<? is almost double as fast according to some stats I saw a while ago
(at phpbeginner.com).. But that's compared to "HTML", using singlequotes is
faster ('HTML')... But I haven't confirmed those stats...
--
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
##########################
Please, if you are using windows, you may be infected by Swen. Please go
here to find out more:
http://us.mcafee.com/virusInfo/default.asp?id=helpCenter&hcName=swen
http://securityresponse.symantec.com/avcenter/venc/data/w32.swen.a@mm.html
##########################
"Joe Harman" <joe@harmanmedia.com> skrev i meddelandet
news:000201c3b08b$ac6097a0$8c3a8e41@cjh...
> Hello,
>
> I would like some opinions, or hopefully facts on a few things... Maybe
> some people can help me out here.
>
> A friend of mine and I were discussing which is best way to use PHP
> building dynamic pages, here are the 2 methods we are comparing.. They
> are in the simplest terms here... But try to imagine a very intesive PHP
> appliaction with huge MySQL queries...
>
>
> First Item
> -------------
> <table width="500" border="0" cellspacing="0"
cellpadding="0">
> <tr>
> <td><?php echo "Hello World"; ?></td>
> </tr>
> </table>
>
>
> Second Item
> -------------
> <?php
> echo "<table width=\"500\" border=\"0\" cellspacing=\"0\"
> cellpadding=\"0\">";
> echo "<tr>";
> echo "<td>Hello World</td>";
> echo "</tr>";
> echo "</table>";
> ?>
>
>
> Now I would say that the first item is the most efficient simply because
> you are not making PHP process the ECHO of HTML code... It's more
> efficient to let the browser do that since it has to interperat it
> anyhow. Am I correct assuming this?
>
> Thanks!
> Joe