errorfunc.constants.html
来自「php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容」· HTML 代码 · 共 302 行
HTML
302 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Predefined Constants</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="errorfunc.resources.html">Resource Types</a></div> <div class="next" style="text-align: right; float: right;"><a href="errorfunc.examples.html">Examples</a></div> <div class="up"><a href="book.errorfunc.html">Error Handling</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div> <h1>Predefined Constants</h1> <p class="simpara">The constants below are always available as part of the PHP core.</p> <blockquote><p><b class="note">Note</b>: <span class="simpara"> You may use these constant names in <var class="filename">php.ini</var> but not outside of PHP, like in <var class="filename">httpd.conf</var>, where you'd use the bitmask values instead. </span> </p></blockquote> <table border="5"> <caption><b>Errors and Logging</b></caption> <colgroup> <thead valign="middle"> <tr valign="middle"> <th colspan="1">Value</th> <th colspan="1">Constant</th> <th colspan="1">Description</th> <th colspan="1">Note</th> </tr> </thead> <tbody valign="middle" class="tbody"> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">1</td> <td colspan="1" rowspan="1" align="left"> <b><tt>E_ERROR</tt></b> (<a href="language.types.integer.html" class="type integer">integer</a>) </td> <td colspan="1" rowspan="1" align="left"> Fatal run-time errors. These indicate errors that can not be recovered from, such as a memory allocation problem. Execution of the script is halted. </td> <td class="empty"> </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">2</td> <td colspan="1" rowspan="1" align="left"> <b><tt>E_WARNING</tt></b> (<a href="language.types.integer.html" class="type integer">integer</a>) </td> <td colspan="1" rowspan="1" align="left"> Run-time warnings (non-fatal errors). Execution of the script is not halted. </td> <td class="empty"> </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">4</td> <td colspan="1" rowspan="1" align="left"> <b><tt>E_PARSE</tt></b> (<a href="language.types.integer.html" class="type integer">integer</a>) </td> <td colspan="1" rowspan="1" align="left"> Compile-time parse errors. Parse errors should only be generated by the parser. </td> <td class="empty"> </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">8</td> <td colspan="1" rowspan="1" align="left"> <b><tt>E_NOTICE</tt></b> (<a href="language.types.integer.html" class="type integer">integer</a>) </td> <td colspan="1" rowspan="1" align="left"> Run-time notices. Indicate that the script encountered something that could indicate an error, but could also happen in the normal course of running a script. </td> <td class="empty"> </td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">16</td> <td colspan="1" rowspan="1" align="left"> <b><tt>E_CORE_ERROR</tt></b> (<a href="language.types.integer.html" class="type integer">integer</a>) </td> <td colspan="1" rowspan="1" align="left"> Fatal errors that occur during PHP's initial startup. This is like an <b><tt>E_ERROR</tt></b>, except it is generated by the core of PHP. </td> <td colspan="1" rowspan="1" align="left">since PHP 4</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">32</td> <td colspan="1" rowspan="1" align="left"> <b><tt>E_CORE_WARNING</tt></b> (<a href="language.types.integer.html" class="type integer">integer</a>) </td> <td colspan="1" rowspan="1" align="left"> Warnings (non-fatal errors) that occur during PHP's initial startup. This is like an <b><tt>E_WARNING</tt></b>, except it is generated by the core of PHP. </td> <td colspan="1" rowspan="1" align="left">since PHP 4</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">64</td> <td colspan="1" rowspan="1" align="left"> <b><tt>E_COMPILE_ERROR</tt></b> (<a href="language.types.integer.html" class="type integer">integer</a>) </td> <td colspan="1" rowspan="1" align="left"> Fatal compile-time errors. This is like an <b><tt>E_ERROR</tt></b>, except it is generated by the Zend Scripting Engine. </td> <td colspan="1" rowspan="1" align="left">since PHP 4</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">128</td> <td colspan="1" rowspan="1" align="left"> <b><tt>E_COMPILE_WARNING</tt></b> (<a href="language.types.integer.html" class="type integer">integer</a>) </td> <td colspan="1" rowspan="1" align="left"> Compile-time warnings (non-fatal errors). This is like an <b><tt>E_WARNING</tt></b>, except it is generated by the Zend Scripting Engine. </td> <td colspan="1" rowspan="1" align="left">since PHP 4</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">256</td> <td colspan="1" rowspan="1" align="left"> <b><tt>E_USER_ERROR</tt></b> (<a href="language.types.integer.html" class="type integer">integer</a>) </td> <td colspan="1" rowspan="1" align="left"> User-generated error message. This is like an <b><tt>E_ERROR</tt></b>, except it is generated in PHP code by using the PHP function <a href="function.trigger-error.html" class="function">trigger_error()</a>. </td> <td colspan="1" rowspan="1" align="left">since PHP 4</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">512</td> <td colspan="1" rowspan="1" align="left"> <b><tt>E_USER_WARNING</tt></b> (<a href="language.types.integer.html" class="type integer">integer</a>) </td> <td colspan="1" rowspan="1" align="left"> User-generated warning message. This is like an <b><tt>E_WARNING</tt></b>, except it is generated in PHP code by using the PHP function <a href="function.trigger-error.html" class="function">trigger_error()</a>. </td> <td colspan="1" rowspan="1" align="left">since PHP 4</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">1024</td> <td colspan="1" rowspan="1" align="left"> <b><tt>E_USER_NOTICE</tt></b> (<a href="language.types.integer.html" class="type integer">integer</a>) </td> <td colspan="1" rowspan="1" align="left"> User-generated notice message. This is like an <b><tt>E_NOTICE</tt></b>, except it is generated in PHP code by using the PHP function <a href="function.trigger-error.html" class="function">trigger_error()</a>. </td> <td colspan="1" rowspan="1" align="left">since PHP 4</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">2048</td> <td colspan="1" rowspan="1" align="left"> <b><tt>E_STRICT</tt></b> (<a href="language.types.integer.html" class="type integer">integer</a>) </td> <td colspan="1" rowspan="1" align="left"> Run-time notices. Enable to have PHP suggest changes to your code which will ensure the best interoperability and forward compatibility of your code. </td> <td colspan="1" rowspan="1" align="left">since PHP 5</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">4096</td> <td colspan="1" rowspan="1" align="left"> <b><tt>E_RECOVERABLE_ERROR</tt></b> (<a href="language.types.integer.html" class="type integer">integer</a>) </td> <td colspan="1" rowspan="1" align="left"> Catchable fatal error. It indicates that a probably dangerous error occured, but did not leave the Engine in an unstable state. If the error is not caught by a user defined handle (see also <a href="function.set-error-handler.html" class="function">set_error_handler()</a>), the application aborts as it was an <b><tt>E_ERROR</tt></b>. </td> <td colspan="1" rowspan="1" align="left">since PHP 5.2.0</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">8192</td> <td colspan="1" rowspan="1" align="left"> <b><tt>E_DEPRECATED</tt></b> (<a href="language.types.integer.html" class="type integer">integer</a>) </td> <td colspan="1" rowspan="1" align="left"> Run-time notices. Enable this to receive warnings about code that will not work in future versions. </td> <td colspan="1" rowspan="1" align="left">since PHP 5.3.0</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">16384</td> <td colspan="1" rowspan="1" align="left"> <b><tt>E_USER_DEPRECATED</tt></b> (<a href="language.types.integer.html" class="type integer">integer</a>) </td> <td colspan="1" rowspan="1" align="left"> User-generated warning message. This is like an <b><tt>E_DEPRECATED</tt></b>, except it is generated in PHP code by using the PHP function <a href="function.trigger-error.html" class="function">trigger_error()</a>. </td> <td colspan="1" rowspan="1" align="left">since PHP 5.3.0</td> </tr> <tr valign="middle"> <td colspan="1" rowspan="1" align="left">30719</td> <td colspan="1" rowspan="1" align="left"> <b><tt>E_ALL</tt></b> (<a href="language.types.integer.html" class="type integer">integer</a>) </td> <td colspan="1" rowspan="1" align="left"> All errors and warnings, as supported, except of level <b><tt>E_STRICT</tt></b> in PHP < 6. </td> <td colspan="1" rowspan="1" align="left"> 32767 in PHP 6, 30719 in PHP 5.3.x, 6143 in PHP 5.2.x, 2047 previously </td> </tr> </tbody> </colgroup> </table> <p class="para"> The above values (either numerical or symbolic) are used to build up a bitmask that specifies which errors to report. You can use the <a href="language.operators.bitwise.html" class="link">bitwise operators</a> to combine these values or mask out certain types of errors. Note that only '|', '~', '!', '^' and '&' will be understood within <var class="filename">php.ini</var>. </p></div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="errorfunc.resources.html">Resource Types</a></div> <div class="next" style="text-align: right; float: right;"><a href="errorfunc.examples.html">Examples</a></div> <div class="up"><a href="book.errorfunc.html">Error Handling</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?