Skip to content

there should not be useless blank lines in the end of file #58

Closed
wants to merge 1 commit into from

4 participants

@janmarek

There is no reason to leave useless blank line in the end of file. At least it is very controversial rule and should not be part of standard.

@janmarek janmarek there is no reason to leave useless blank line on the end of file
there is no reason to leave useless blank line on the end of file
052fd06
@pmjones pmjones closed this Nov 12, 2012
@jakubkulhan

The core problem is what you define line and whether end-on-line character sequence is part of the line or not. UNIX-based editors (such as VIM) or tools (such as Git) use EOL character sequence as line terminator, therefore it's a part of the line. It's similar to use of semicolon (;) in C and Pascal. In C semicolon terminates statements, in Pascal it separates them.

"Blank line at the end of file" is ambiguous. The standard should define what is line of PHP source. I would recommend using UNIX-based definition (EOL character sequence as terminator).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.