我们可以渐渐地看下PHP数据类型报错了有哪些呢?随着青岛风月网做了一次解析。
-
<?php
-
error_reporting(0); //禁用错误报告
-
error_reporting(E_ERROR | E_WARNING | E_PARSE);//报告运行时错误
-
error_reporting(E_ALL); //报告所有错误
-
error_reporting(E_ALL ^ E_NOTICE); //除E_NOTICE报告所有错误,是在php.ini的默认设置
-
error_reporting(-1); //报告所有 PHP 错误
-
error_reporting(3); //不报E_NOTICE
-
error_reporting(11); //报告所有错误
-
ini_set('error_reporting', E_ALL); // 和 error_reporting(E_ALL); 一样
-
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);//表示php错误,警告,语法错误,提醒都返错。
-
?>
阅读(2393) | 评论(0) | 转发(0) |