There's really not too much to say about the issue.
A PHP file ending like so:
<php
//code
?>
will actually make PHP send headers to the client, because of the whitespace after the closing ?>
tag, which you can see if you highlight the code block. Whitespace or linebreaks at the end of files can be easy to miss and hard to track down.
Once the headers are sent, it's impossible to do stuff like change the status line or the content type.
Since a closing tag is implied at the end of a file, you can just omit the closing tag for files with only PHP code. If you do, any trailing whitespace will be treated as whitespace in code, not whitespace in content, and will be ignored.