Re: omit the closing ?> (was Re: [PEAR-DEV] [PEPr] +1 for Semantic Web::XML_GRDDL)
| From: | Michael Gauthier | Date: | Sat, 03 May 2008 22:58:05 +0000 |
| Subject: | Re: omit the closing ?> (was Re: [PEAR-DEV] [PEPr] +1 for Semantic Web::XML_GRDDL) | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-49995@lists.php.net to get a copy of this message | ||
On Sat, 2008-03-05 at 23:28 +0200, till wrote:
> On Sat, May 3, 2008 at 11:21 PM, Michael Gauthier <mike@silverorange.com> wrote:
> > (...)
> > 1. missing ?> at the end of files
>
> That's not necessary in PHP5. I am not sure what PEAR's official
> opinion on this is, but it's a huge advantage because you no longer
> have to check for new lines after the closing ?> which some
> editors/IDEs/people (like to) add.
I know they're not necessary, but I thought they were required in PEAR.
After reviewing the CS manual I don't see any mention of them being
required. I know Zend Framework explicitly forbids using the closing ?>
for the reason you mention.
Also, a single newline after the closing ?> is does not cause problems.
It's when there is more than one newline or when there is other
whitespace that problems arise.
Mike