Howdy, Stranger!

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


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

Damian99Damian99 USAMember Posts: 116
edited February 2014 in PHP

When should we the constant PHP_EOL?



  • XartrickXartrick FranceMember Posts: 9

    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.