Why is PHP_EOL ineffective in PHP?

Source: Internet
Author: User
Why is PHP_EOL in PHP ineffective? The following program: & lt ;? Phpheader ('content-Type: text/html; charset = utf-8 '); function & nbsp; customError ($ errno, & nbsp; $ errstr why is PHP_EOL in PHP ineffective?
The following procedure:

Header ('content-Type: text/html; charset = utf-8 ');

Function customError ($ errno, $ errstr, $ errfile, $ errline ){
Echo'Error code:['. $ Errno.'] '. $ errstr. PHP_EOL;
Echo 'code line of the error: '. $ errline.' file '. $ errfile. PHP_EOL;
Echo 'php version: '. PHP_VERSION.' ('. PHP_ OS.') '. PHP_EOL;
Die ();
Set_error_handler ('customerror', E_ALL | E_STRICT );
$ A = array ('O' => 2, 4, 6, 8 );
Echo $ a [o];

Error code: [8] Use of undefined constant o-assumed 'O' the error code line: 12 file/usr/local/apache/htdocs/mytest/test2.php PHP version: 5.4.19 (Linux)

There is no line feed in the middle. why ??

My environment is shared by centos:
------ Solution --------------------
Echo $ a ['O'];

Line Feed is
------ Solution --------------------
PHP_EOL is text wrap, not html wrap
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.