Page 2 of 2
Posted: Fri Jun 22, 2007 2:28 am
by Maugrim_The_Reaper
I do have newlines. A long while back I stopped using the closing tags though so it's a non-issue for me.
Posted: Fri Jun 22, 2007 3:03 am
by djot
-
The phpeclicpse (plugin for eclipse) framework unfortunately has the trailing line in the default php template. I always remove all empty lines in top or at the bottom of all files (not only in PHP files). I sometimes had problems with "headers already sent" when there were empty lines after the closing PHP tag.
djot
-
Posted: Fri Jun 22, 2007 10:11 am
by Luke
In all of my PHP history, I've never had even one headers sent error due to trailing newlines
Posted: Sat Jun 23, 2007 5:07 am
by Weirdan
As people has previously mentioned, leaving out closing tag is good for your php
About newlines... I don't know and I don't care since it doesn't cause any trouble either way.
Posted: Sat Jun 23, 2007 6:59 am
by superdezign
The Ninja Space Goat wrote:In all of my PHP history, I've never had even one headers sent error due to trailing newlines
Happened to me once, but PHP told me which file and it was as simple as hitting backspace to fix. I always close the tags.
Posted: Sat Jun 23, 2007 7:44 am
by Chris Corbyn
I don't use the ?> tag, but I always ensure I have a traiing newline after the closing } brace of my class.
It just looks wrong to me when a file ends without a blank line. Some UNIX tools will warn you about missing newlines too. It's probably something to do with each line expected to have EOL after it.
Emacs will warn you if you try to save a file without a trailing line from what I remember. nano/pico add a newline automatically.