In which situations it is recommended to use the PHP constant “PHP_EOL”? - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In which situations it is recommended to use the PHP constant “PHP_EOL”?

Damian99Damian99 USAPosts: 116Member
edited February 2014 in PHP

When should we the constant PHP_EOL?

Tagged:

Comments

  • XartrickXartrick FrancePosts: 9Member

    The main use of this constant is Operating System dependent.
    Windows uses CR+LF, Linux uses LF and MAC uses CR.

    It can matter in case of text files line returns, in how to handle new lines properly.

Sign In or Register to comment.