Wrong detection of end of file

The end of the file is not being parsed correctly, ending up with the last "}" to me marked as an error.

If one edits, by adding a blank line and then removing it, the "error" warning disappears.


Yea, I've seen that too and been meaning to file it as a bug. Drives me crazy. I'll file it as a bug today, or you can...


Do you end your PHP files with


Or with



So that's what causing this. It is driving me nuts. The only fix I've found is to cut-n-paste the whole document.

By the way, I end with "?>" since most of the documents I work on use PHP for templating (mixed HTML and PHP).


I end mine that way to, and I just do (key to find next error), then Enter, then Backspace. That fixes it, but yes, it's a pain.


Please sign in to leave a comment.