Edit report at http://bugs.php.net/bug.php?id=48918&edit=1

 ID:                 48918
 Updated by:         j...@php.net
 Reported by:        none at of dot your dot biz
 Summary:            Proposal to newline after close-tag issue
-Status:             Open
+Status:             Wont fix
 Type:               Feature/Change Request
-Package:            Feature/Change Request
+Package:            *General Issues
 PHP Version:        5.3.0
 Block user comment: N
 Private report:     N

 New Comment:

Changing it would potentially break old stuff. Won't happen.


Previous Comments:
------------------------------------------------------------------------
[2009-07-14 14:56:53] none at of dot your dot biz

Sorry, i should add that I wrote this in response to bug #47707 but was
unable to post, since that bug was closed. The referred to "more redthan
mine" example can be found in that bug.

------------------------------------------------------------------------
[2009-07-14 14:54:25] none at of dot your dot biz

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 this bug report at http://bugs.php.net/bug.php?id=48918&edit=1

Reply via email to