Re: Cut out "?>" php tails ?
| From: | bertrand Gugger | Date: | Tue, 21 Feb 2006 21:45:10 +0000 |
| Subject: | Re: Cut out "?>" php tails ? | ||
| References: | 1 2 | Groups: | php.pear.qa |
| Request: | Send a blank email to pear-qa+get-3533@lists.php.net to get a copy of this message | ||
Justin Patrin wrote:
On 2/21/06, bertrand Gugger <bertrand@toggg.com> wrote:errare humanum est For the notice, php will close the file and treats EOF anyway. As said, it's anybody choice. -- togggHello, Cutting out "?>" php tails from sources avoid unwanted blank outputs which kills headers. I did, as some release was needed, some experiments with last Benchmark and Net_Monitor. Seems to be ok. I would suggest that to become a rule. Without any opposition from you, I plan to do the same by Text_Wiki and subs , what represents a few classes / files.I would suggest not. As another person said a little while ago this just promotes sloppyness. The fact that PHP will "automatically" close <?php is really just a hack to allow people to be sloppy. Every opening tag/brace/parenthesis/quote/etc. should have a matching close, <?php included. If files have extra whitespace after a ?> then that's a bug. Now, it *could* be possible to simply allow people to do what they wish (although I would be in favor of making ?> a requirement of it is not already). I am heartily opposed, however, to making it a rule that you should *not* have ?>. -- Justin Patrin In so far, pear classes are restricted to one file , then php file , the sloppyness as you say is just ensuring security.