I did an amazing discovery today. There is a PHP constant called PHP_EOL you can use instead of "\n". This will make your script cross platform.
I honestly did not know about this. I'm happy I learnt something new today.
<?php
echo "This is an amazing discovery." . PHP_EOL . "I'm so happy! ;-)";
?>
Another great one is DIRECTORY_SEPARATOR.
Find more here: http://php.net/manual/en/reserved.constants.php


I usually define('DS', DIRECTORY_SEPARATOR) and define('PS', PATH_SEPARATOR) for better usability of these constants.