Introduced in version 5.0.2 of php,
PHP_EOL is a string constant that represents the correct end of line symbol for
the platform that you are running php on.
So on Windows this should be set to
"\r\n" (carriage return and line feed) and on a *nix system it should be set to
"\n" (only line feed).
Todd Eidson is a full stack application developer and life-long learner. He is a pragmatic programmer, a believer in clean coding, and an evangelist for extensible and reusable code. His hobbies include collecting old jazz records and going to live music performances.
North Central Ohio, US
All opinions are my own, probably wrong, and subject to change without notice.
© 2017 Todd Eidson. All content is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License.