Thanks for your thoughts. I don't believe it can be as fast as single
quotes, simply because it does variable interpolation, and that's why
printing doubly quoted strings are slower than singles, hence i would think
here docs would be slower as well...but nothing so great that i would to
worry about....
anyone else? is a big here doc the "fastest" way to print out a lot of html
with variables?



-----Original Message-----
From: Plutarck [mailto:[EMAIL PROTECTED]]
Sent: Saturday, April 07, 2001 2:31 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] here doc performance


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"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to