Re: Re: headers and newline at end of script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2006-07-20 at 16:53, Adam Zey wrote:
> Jochem Maas wrote:
> > I don't understand - the links point to posts by Rasmus saying that's
> > 'beneficial' - seems to me to be a fairly robust endorsement yet you
> > consider leaving off trailing '?>' wrong (and use Rasmus' comments to
> > back that up)
> >
> > we're having another heatwave here in europe so that
> > could be compounding my lack of understanding ;-)
> >   
> I believe it's the opposite. I said it was bad practice. He disagreed, 
> and used his links to back himself up.
> 
> Note that just because the fact that it works is a feature, doesn't mean 
> it's good coding style. register globals is a feature too, but it isn't 
> exactly a good idea to use it.

That's a good point, but if your code is well separated from your
content, then the opening PHP tag merely gives your code necessary
context. Closing it is more adverse than no closing it since you may
accidentally leave whitespace as the OP was finding. Thus omission of
the closing tag leads to cleaner code and easier maintenance since you
don't need to track down whitespace error (nor do you need to enable
ob_start() to solve said issue).

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux