Lee, yes you're right. Using single quotes to denote a litteral string does
speed things up a bit. My bench sped up by about .08 seconds over 10,000
echos. That's about 5 pages worth of text. Is .08 seconds worth worrying
about? I'm gonna go out a limb here and say.. no. :)
-Kevin
----- Original Message -----
From: "Lee Doolan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 23, 2002 1:40 PM
Subject: [PHP] Re: parsing
> >>>>> "Dave" == Dave At Sinewaves Net <[EMAIL PROTECTED]> writes:
>
> Dave> Okay, I want to know if anybody has a clue which is more
> Dave> efficient, processorwise/parsingwise:
>
> Dave> this: ------ echo
> Dave>
"<table><tr><td><b>".$somevar."</b><br>".$somevardesc."</td></tr></table>";
>
> Dave> or this: ------ echo
> Dave>
"<table><tr><td><b>{$somevar}</b><br>{$somevardesc}</td></tr></table>";
>
>
> Dave> I almost always use the first method (just seems more
> Dave> readable to me), but with all of the discussion popping up
> Dave> about curly brackets, i was wondering if it really makes a
> Dave> difference? Any vets out there care to put in their $0.02?
>
> I bet that this would beat the pants off of both:
>
> echo '<table><tr><td><b>'. $somevar . '</b><br>' . $somevardesc .
'</td></tr></table>';
>
>
> --
> When the birdcage is open, | donate to causes I care about:
> the selfish bird flies away, | http://svcs.affero.net/rm.php?r=leed_25
> but the virtuous one stays. |
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php