When reading the manual, I found the PHP_EOL variable and checked the information, it turns out to be equivalent to line breaks in unix series \ n in windows series \ r \ n in mac \ rPHP can be replaced with PHP_EOL to improve the source code portability for example: [php] echoPHP_EOL; // window... "/> <scripttype =" text/ja
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.