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

Damian99Damian99 USA
edited February 2014 in PHP

When should we the constant PHP_EOL?

Comments

  • 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.

Howdy, Stranger!

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

Categories

In this Discussion