(PHP 5.3.6)
I have a php file that simply contains this text: there are no php tags anywhere, without a trailing new line or extraneous spaces:
<div style="border:1px solid green">abc</div>
Now including this from another php file as follows (again, without extraneous spaces anywhere):
<div style="border:1px solid red"><?php include "abc.php" ?></div> <br /> <div style="border:1px solid red"><div style="border:1px solid green">abc</div></div>
I get the result below.

Note that the second method directly uses the included content. They should be similar to the bottom, but, as you see, include leads to the fact that some wierd newline type is inserted before the contents of the included file. I say "wierd" because when I check the source source (via the Chrome view source), nothing is visible there:

When this section of the page appears in the Chrome inspector, there seems to be something, but what exactly cannot I say:

It seems to be just an empty line, but why an empty line will cause new lines and why it will be there is, first of all, a mystery. Adding a semicolon to the end of the include statement does not matter. It occurred to me that this could be null byte or 13 (CR), but that should not cause HTML line breaks anyway.
Does anyone know how I can get rid of this unwanted new line?
source share