From: none at of dot your dot biz Operating system: PHP version: 5.3.0 PHP Bug Type: Feature/Change Request Bug description: Proposal to newline after close-tag issue
Description: ------------ I have read the (various) bug reports on this issue and I am aware that the subject has already been discussed to death. Not wanting to "flog a dead horse" further, I have a simple proposal that I haven't seen mentioned anywhere before and wanted to run it past the PHP devs to get their opinion on it. The proposal is this: the newline following a close tag is still swallowed at the end of a file to avoid the accidental output problem, but that inside the file, where more content follows, the newline is not swallowed. This would satisfy both camps, wouldn't it? obviously, the "more redthan mine" example above would not occur. And the work-around that prevents a newline at the end of a file (forced by some editors) being output where none were intended, potentially forcing the sending of headers, would remain intact. I'd love to hear some feedback on this proposal. Obviously, the dev team needs to ensure that scripts written in PHP remain compatible with future versions of PHP wherever possible. But equally, as can be seen by the response from frustrated PHP programmers, this quirky behaviour is inconvenient in a number of situations, including output beautification and the potential error situation mentioned in the "more redthan mine" example above. I was hoping that this proposal might sit somewhere in between the two sides of the argument. -- Edit bug report at http://bugs.php.net/?id=48918&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48918&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48918&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48918&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=48918&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48918&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=48918&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=48918&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=48918&r=needscript Try newer version: http://bugs.php.net/fix.php?id=48918&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=48918&r=support Expected behavior: http://bugs.php.net/fix.php?id=48918&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=48918&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=48918&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=48918&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48918&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=48918&r=dst IIS Stability: http://bugs.php.net/fix.php?id=48918&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=48918&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=48918&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=48918&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=48918&r=mysqlcfg
