PHP_EOL 用法 : Most Worthless Constant?
PHP_EOL may very well be the most worthless general-purpose constant in modern PHP. It's supposed to be helpful for cross-platform developing, for example you could write a PHP-powered shell script that says:
?
and then expect the proper newline to terminate the output string based on the platform PHP is running on.
That's all well and good, but the following is functionally equivalent:
$str = str_replace(PHP_EOL, '', $str);?
?
来源: http://blog.sina.com.cn/s/blog_6dbaeb9b0100z4tt.html
?
?