Re: POLL: To add the final ?> or not...
| From: | Ashley Sheridan | Date: | Thu, 14 Jan 2010 22:36:52 +0000 |
| Subject: | Re: POLL: To add the final ?> or not... | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-301118@lists.php.net to get a copy of this message | ||
On Thu, 2010-01-14 at 23:37 +0100, Kim Madsen wrote:
> Ashley Sheridan wrote on 14/01/2010 23:30:
>
> >> What is the difference between:
> >>
> >> <?
> >> print "hello PHPeople";
> >> ?>WHITESPACE
> >>
> >> and
> >>
> >> <?
> >> print "hello PHPeople";
> >> WHITESPACE
> >>
> >> Same shit when I look at it, a sloppy developer is what it is :-)
> >>
> >> --
> >> Kind regards
> >> Kim Emax - masterminds.dk
> >>
> >
> > Plenty of differences, if you include the first one as a file, the
> > whitespace gets sent to the browser because it is not part of the PHP,
> > and so is assumed to be HTML. Once this happens, the headers have been
> > sent, so you can't use different headers in your script.
>
> Hmm... you could be right. I guess I just never made that mistake :-)
> --
> Kind regards
> Kim Emax - masterminds.dk
>
What has been said on this thread a few times is it is not always a
developer error, but a bug with the editor, which is not something that
will be picked up until it occurs.
Thanks,
Ash
http://www.ashleysheridan.co.uk