Re: PHP tags - any reasons to close ?>

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

 



On Tue, Sep 23, 2008 at 12:28 PM, Robert Cummings <robert@xxxxxxxxxxxxx> wrote:
> On Tue, 2008-09-23 at 14:37 +0100, Michal Sokolowski wrote:
>> Hi,
>>
>> First time I've seen code without closing tag is when I've read about Zend
>> Framework and bellow is what they say about it.
>>
>> "For files that contain only PHP code, the closing tag ("?>") is never
>> permitted. It is not required by PHP, and omitting it prevents the
>> accidental injection of trailing whitespace into the response. "
>
> Support for omitting the closing PHP tag is a "feature". Search the
> archives if you need verification.
>
> Cheers,
> Rob.

Correct. The line Michal quoted is describing a coding standard in the
Zend Framework, not a language requirement. Obviously closing tags are
always permitted in PHP. The Zend Framework team has just adopted a
standard that they are not to be used within the framework codebase
itself, for the reasons stated in the rest of the quoted reference.
Thus, within their standard, the closing tag is never permitted. :-)

Andrew

-- 
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