Skip to content

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

Closed
janmarek wants to merge 1 commit into
php-fig:masterfrom
janmarek:master
Closed

there should not be useless blank lines in the end of file#58
janmarek wants to merge 1 commit into
php-fig:masterfrom
janmarek:master

Conversation

@janmarek

Copy link
Copy Markdown

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.

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

Copy link
Copy Markdown

👎

@jakubkulhan

Copy link
Copy Markdown

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants