Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> 'cause they like pressed enter a few times after the end of the scope

A large number of text editors automatically add a newline at the end of a non-empty final line. This problem doesn't have to come up because of some explicit action.



> A large number of text editors automatically add a newline at the end of a non-empty final line

... and doesn't PHP ignore it? I believe so. You actually need two newlines to cause issue, ie. "?>\n\n".

And, anyway, the solution is trivial and good practice anyway, on a number of levels. So why continue to argue? Sometimes people don't like to change their habits.

PS. Many editors can be configured to add "?>" for you, too!




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: