Home > Backend Development > PHP Tutorial > 请教PHP中的PHP_EOL为什么没有效果

请教PHP中的PHP_EOL为什么没有效果

WBOY
Release: 2016-06-13 12:37:30
Original
1248 people have browsed it

请问PHP中的PHP_EOL为什么没有效果?
如下程序:

<br />
<?php<br />
header('Content-Type:text/html;charset=utf-8');<br />
<br />
function customError($errno, $errstr, $errfile, $errline) {<br />
	echo '<b>错误代码:</b>['.$errno.'] '.$errstr.PHP_EOL;<br />
	echo '错误所在的代码行:'.$errline.' 文件'.$errfile.PHP_EOL;<br />
	echo 'PHP版本:'.PHP_VERSION.'('.PHP_OS.')'.PHP_EOL;<br />
	die();<br />
}<br />
set_error_handler('customError', E_ALL|E_STRICT);<br />
$a = array('o' => 2, 4, 6, 8);<br />
echo $a[o];<br />
<br />
Copy after login


输出:
错误代码:[8] Use of undefined constant o - assumed 'o' 错误所在的代码行:12 文件/usr/local/apache/htdocs/mytest/test2.php PHP版本:5.4.19(Linux) 

中间没有任何换行,为什么呢??

我的环境是centos

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template