Re: PHP tags - any reasons to close ?>
| From: | tedd | Date: | Tue, 23 Sep 2008 15:37:28 +0000 |
| Subject: | Re: PHP tags - any reasons to close ?> | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-280782@lists.php.net to get a copy of this message | ||
At 2:32 PM +0200 9/23/08, Martin Zvarík wrote:
Hi, I have seen some projects where people start with opening tag <?php but they DON'T close it with ?> This is especially the case of CONFIG.php files... 1) What's the reason of that? 2) What if you would not close any 100% PHP files? 3) What's the reason of making an empty space after ?> I've also seen this in some projects. Thanks for ideas, MartinMartin: I've heard all the reasons why one should not put a "?>" at the end of a php file, but for me, I'm just a creature of habit -- I like symmetrical things. Certainly I know the minor dangers of white space, but I always make certain that my files end with "?>" with no trailing white space. Like with all programming languages, if you do it right, it will work right*. Cheers, tedd * (unless you're working with IE) :-) -- ------- http://sperling.com http://ancientstones.com http://earthstones.com