the issue is that PHP_EOL is different depending on which OS you are running the code.