Re: here doc performance
| From: | Plutarck | Date: | Sat, 07 Apr 2001 06:31:21 +0000 |
| Subject: | Re: here doc performance | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-47550@lists.php.net to get a copy of this message | ||
To my knowledge, though I haven't done any testing with microtime, heredoc
is as faster as using single quotes.
Since the only thing PHP looks for is the characters that were present at
the very begining on the string, there should certainly be no slowdowns at
all.
If it's not that way, I imagine it would be just a bad implementation which
will be fixed soon. But I strongly doubt a bad implementation of here doc
printing was made.
--
Plutarck
Should be working on something...
...but forgot what it was.
""Jack Dempsey"" <dempsejn@georgetown.edu> wrote in message
news:NEBBKBGAMLPMIDAJEALPKEMACGAA.dempsejn@georgetown.edu...
> Hi all,
>
> I use the here doc option heavily in pages i create, outputting large
chunks
> of HTML with variables inside the echo<<<EOF ...... EOF; syntax...is there
a
> better way to do this? I'm wondering if anyone knows of running times for
> things like that...i would think that it'd be better than going back and
> forth between php and html (certainly easier), wouldn't have to escape the
> quotes like you would if you used
> echo "
>
> lots of html
> ...
>
> ";
>
> Any thoughts on this?
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>