Page 1 of 1
What is the use of PHP_EOL
Posted: Thu Jun 04, 2009 5:37 am
by jerrystar
What is the use of PHP_EOL,generally in which case we will be using this?
Re: What is the use of PHP_EOL
Posted: Thu Jun 04, 2009 10:10 am
by pickle
Different operating systems use different characters to signify an end of a line in a file. Rather than hardcoding to use "\L" (which isn't really a character - just an example), you can use PHP_EOL, which will allow your script to be more cross-OS compatible.
Re: What is the use of PHP_EOL
Posted: Thu Jun 04, 2009 10:32 am
by Chalks
what else is used besides \r\n and \n?
Re: What is the use of PHP_EOL
Posted: Thu Jun 04, 2009 12:37 pm
by mikemike
None really. Read until your heart's content

:
http://en.wikipedia.org/wiki/Newline
Re: What is the use of PHP_EOL
Posted: Thu Jun 04, 2009 1:43 pm
by Chalks
heh. Show me someone who doesn't love wikipedia and I'll show you someone who doesn't have a soul.
