The PHP_EOL line break in php. When reading the manual, I found the PHP_EOL variable and checked the information. it turns out that it is equivalent to line breaks. in the unix series, n is used. in the windows series, rn can be used in mac rPHP to replace PHP_EOL, when reading the manual, I found the PHP_EOL variable and checked the information. it turned out to be a line break.
\ N in unix
\ R \ n for windows
Use \ r on mac
PHP can be replaced with PHP_EOL to improve the source code portability.
For example:
[Php]
Echo PHP_EOL;
// Windows platforms are equivalent to echo "\ r \ n ";
// The unix/linux platform is equivalent to echo "\ n ";
// Mac platform is equivalent to echo "\ r ";
Echo PHP_EOL;
// Windows platforms are equivalent to echo "\ r \ n ";
// The unix/linux platform is equivalent to echo "\ n ";
// Mac platform is equivalent to echo "\ r ";
We can use the get_defined_constants () function to obtain all PHP constants.
In unix, \ n is used in windows. \ r \ n can be replaced by PHP_EOL in mac, \ r PHP...