Macs should definitely use \n. All command-line, scripting, etc. on Mac uses the Unix standard \n for line endings.
The \r is only ever used by GUI programmes, and is really a left-over from OS 9 and before, where it was standard. Many OS X GUI programmes use the \n now too (e.g. TextEdit, the standard OS X text editor, saves with \n by default).
The PHP_EOL constant has been available from 4.3.10 and 5.0.2.
php -r "print_r(get_defined_constants());" # List all defined constants php -r "print(ord(PHP_EOL));" # For my Mac it's 10 (\n), probably
because of the unix core
-- iwan standley