mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
user notes intehrated,
$php_errmsg is not global, some links git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@98946 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
436a4fc629
commit
7f1250e8cd
1 changed files with 19 additions and 9 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<section id="errorfunc.configuration">
|
||||
&reftitle.runtime;
|
||||
&extension.runtime;
|
||||
|
@ -17,7 +17,7 @@
|
|||
<tbody>
|
||||
<row>
|
||||
<entry>error_reporting</entry>
|
||||
<entry>NULL</entry>
|
||||
<entry>E_ALL & ~E_NOTICE</entry>
|
||||
<entry>PHP_INI_ALL</entry>
|
||||
</row>
|
||||
<row>
|
||||
|
@ -120,14 +120,23 @@
|
|||
<link linkend="ini.display-errors">display_errors</link> directive.
|
||||
</para>
|
||||
<para>
|
||||
The default value does not show <constant>E_NOTICE</constant> level
|
||||
errors. You may want to show them during development.
|
||||
In PHP 4 the default value does not show <constant>E_NOTICE</constant>
|
||||
level errors. You may want to show them during development.
|
||||
</para>
|
||||
<note>
|
||||
<para>Enabling <constant>E_NOTICE</constant> during development has
|
||||
some benefits. For debugging purposes: NOTICE messages will warn you
|
||||
about possibls bugs in your code. For example, use of unassigned values
|
||||
are warned. It is extremely useful to find typos and
|
||||
to save time for debugging. NOTICE messages will warn you about bad style.
|
||||
For example, $arr[item] is better to be written as $arr['item'] since
|
||||
PHP tries to treat "item" as constant. If it is not a constant, PHP assumes
|
||||
it is a string index for the array.
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
In PHP 4, the default setting is
|
||||
<literal>E_ALL & ~E_NOTICE</literal>, meaning to display all errors
|
||||
and warnings which are not E_NOTICE-level. In PHP 3, the default
|
||||
setting is <literal>(E_ERROR | E_WARNING | E_PARSE)</literal>,
|
||||
In PHP 3, the default setting is
|
||||
<literal>(E_ERROR | E_WARNING | E_PARSE)</literal>,
|
||||
meaning the same thing. Note, however, that since constants are not
|
||||
supported in PHP 3's <filename>php3.ini</filename>, the error_reporting
|
||||
setting there must be numeric; hence, it is <literal>7</literal>.
|
||||
|
@ -249,7 +258,8 @@
|
|||
<listitem>
|
||||
<para>
|
||||
If enabled, the last error message will always be present in the
|
||||
global variable <varname>$php_errormsg</varname>.</para>
|
||||
variable <link linkend="reserved.variables.phperrormsg">$php_errormsg</link>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
|
Loading…
Reference in a new issue