I have modified end-of-file settings with no positive results. This has been tested on two different machines with the same result, with files created in multiple editors.
The issue does not seem to appear in other documents, only in documents that have a closing PHP statement in the middle of the file.
Note that copying the file to a directory and opening it locally will result in the file being displayed properly.
Is this a bug or is there a setting I have missed?