Re: here document
| From: | Dean Hall | Date: | Thu, 02 Nov 2000 11:41:22 +0000 |
| Subject: | Re: here document | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-23371@lists.php.net to get a copy of this message | ||
> No, absolutely not. I merely feel that their existence is not
> sufficient reason to argue against the use of here docs, which was
> implied by someone else. And I did mention that it was a contrived
> example. The original poster has posited that here docs were
> completely unnecessary in PHP. I'm just demonstrating that for some
> (rather common) situations, it may indeed be the cleanest (subjective)
> solution.
>
> As I said before, YMMV.
>
> If anyone wants to continue, we should prolly do it off list. :) I
> sorta get the feeling this conversation is only interesting to the
> four of us anymore. ;)
>
>
> Cheers,
>
> Torben
Please don't put words in my mouth. I was not aware of the presence of here
documentation in PHP, and my statements were based on that assumption. It
certainly may be the cleanest solution for printing out a few lines of HTML
with interpolated variables -- or for printing out successive variables
amidst HTML. For one single variable in the midst of a bunch of HTML, <?php
echo $var ?> isn't that bad. As for not using <?, I see your point, but I
have full control over my server, and I'm not writing for anyone else. If
someone actually wanted to use my code (gasp), I'd be glad to convert it all
to <?php with a simple Perl prog.
Dean.