I try to use single quotes as much as possible and I\'ve noticed that I can\'t use \\n in single quotes. I know I can just enter a newline literally by pressing return, but
This worked well for me:
print_r('Hello world'.PHP_EOL);