Get the App
SLTechnology News&Howtos  ›  Development  › 

What is the use of the newline variable PHP_EOL in php

Shulou Source: shulou.com Published: 2022-06-01 04:49:48 10月04日 Update

This article mainly shows you the "what is the use of the newline variable PHP_EOL in php", the content is simple and clear, and I hope it can help you solve your doubts. Let me lead you to study and learn "what is the use of the newline variable PHP_EOL in php"?

Newline variable PHP_EOL

Usage scenario: a small line break actually has different implementations on different platforms.

In the unix world, the line break is replaced by / n, but windows uses / r to reflect his difference, and more interestingly, / r in mac.

PHP_EOL is a variable that has been defined in php and represents the newline character of php.

This variable will vary depending on the platform. It will be / r in windows, / n in linux and / r in mac.

The above is all the content of the article "what is the use of the newline variable PHP_EOL in php?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Variable different content article platform learning help interesting world Chinese representative scene that is newline character easy to understand is in more organization knowledge ribbon Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Linux OPPO Reno Microsoft Apple