Closed GoogleCodeExporter closed 9 years ago
I have not add the closing tag in all php file i wrote.
I m not sure it would be mandatory. PHP does not raise any message or error for
that.
I have searched a bit, and i found in Zend documentation :
"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 white space into the response."
So I think i will not add closing tag to php files for now.
Original comment by mathieu....@gmail.com
on 3 Jun 2011 at 1:51
The link of the php file formatting :
http://framework.zend.com/manual/en/coding-standard.php-file-formatting.html
Original comment by mathieu....@gmail.com
on 3 Jun 2011 at 1:53
After some more reading, indeed PHP doc says it is optional to have an closing
tag at the end of a PHP file:
http://php.net/manual/en/language.basic-syntax.instruction-separation.php
...still it does not feel intuitive :-)
Original comment by lightwor...@gmail.com
on 3 Jun 2011 at 8:07
I understand, but it is safer for unwanted chars :)
Original comment by mathieu....@gmail.com
on 4 Jun 2011 at 11:29
Original issue reported on code.google.com by
lightwor...@gmail.com
on 2 Jun 2011 at 7:34