mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
error_reporting: Document E_ALL. Rewrite second example for only PHP 4.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@76367 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
200735b425
commit
548d8a1563
2 changed files with 21 additions and 13 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.18 $ -->
|
||||
<!-- $Revision: 1.19 $ -->
|
||||
<appendix id="phpdevel">
|
||||
<title>Extending PHP 3</title>
|
||||
|
||||
|
@ -882,6 +882,14 @@ php3_list_delete(resource_id->value.lval);
|
|||
generate this type of error.
|
||||
</simpara>
|
||||
</sect2>
|
||||
|
||||
<sect2 id="internal.e-all">
|
||||
<title>E_ALL</title>
|
||||
<simpara>
|
||||
All of the above. Using this error_reporting level will show
|
||||
all error types.
|
||||
</simpara>
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
||||
</appendix>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.26 $ -->
|
||||
<!-- $Revision: 1.27 $ -->
|
||||
<reference id="ref.errorfunc">
|
||||
<title>Error Handling and Logging Functions</title>
|
||||
<titleabbrev>Errors and Logging</titleabbrev>
|
||||
|
@ -237,6 +237,12 @@ error_reporting (E_ALL ^ E_NOTICE); // The same in both PHP 3 and 4
|
|||
<link linkend="internal.e-user-error">E_USER_NOTICE</link>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>2047</entry>
|
||||
<entry>
|
||||
<link linkend="internal.e-all">E_ALL</link>
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
|
@ -246,24 +252,18 @@ error_reporting (E_ALL ^ E_NOTICE); // The same in both PHP 3 and 4
|
|||
<title><function>error_reporting</function> examples</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
// Turn off all error reporting
|
||||
error_reporting(0);
|
||||
/* Turn off all reporting */
|
||||
|
||||
/* Examples are presented firdt in the old sxtax (for PHP 2/3)
|
||||
* and the new - and adviced - syntax for PHP 3/4
|
||||
*/
|
||||
|
||||
error_reporting (7);
|
||||
// Report simple running errors
|
||||
error_reporting (E_ERROR | E_WARNING | E_PARSE);
|
||||
/* Good to use for simple running errors */
|
||||
|
||||
error_reporting (15);
|
||||
// Reporting E_NOTICE can be good too (to report uninitialized
|
||||
// variables or catch variable name misspellings)
|
||||
error_reporting (E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
|
||||
/* good for code authoring to report uninitialized or (possibly mis-spelled) variables */
|
||||
|
||||
error_reporting (63);
|
||||
// Report all PHP errors (use bitwise 63 in PHP 3)
|
||||
error_reporting (E_ALL);
|
||||
/* report all PHP errors */
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
|
|
Loading…
Reference in a new issue