Why is PHP_EOL in PHP ineffective?

Source: Internet
Author: User
Why is PHP_EOL in PHP ineffective? The following procedure:
 Error code :['. $ errno. ']'. $ errstr. PHP_EOL; echo 'line of code where the error is located :'. $ 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];


Output:
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 centos


Reply to discussion (solution)

Echo $ a ['O'];

Line Feed is

PHP_EOL is text wrap, not html wrap

Thank you!

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.