I have this very simple code:
"This is great".PHP_EOL."\r\nfoobar";
You are apparently mixing up 2 things:
\r\n characters are only correctly displayed when you run your PHP script in
As, I would say, 99% use PHP for Web Applications these characters are ignored. Use instead the HTML tags. For example
<br /> for a new line.