|
Posted by John Dunlop on 03/25/06 02:59
Justin Koivisto:
> or you could define the end of line string in a constant for easier
> modification down the road...
Good idea I reckon...
> define('CRLF',"\r\n");
That's circular. Since '\r\n' in double quotes means a CRLF pair,
define()-ing 'CRLF' as such doesn't better position you. What's worse,
if the value was to change to one or the other (i.e., to either CR or
LF, or indeed to something else) then the label 'CRLF' becomes a
misnomer.
What is useful to define(), I think, and I believe this was your
point, is not a label representing a particular 'end of line string'
but rather the end-of-line itself. (There is a predefined constant,
namely 'PHP_EOL', that would seem to stand for end-of-line, but I can't
find any documentation.)
--
Jock
[Back to original message]
|