mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 08:28:54 +00:00
Default value for error_reporting is E_ALL as of PHP 8.0.0 (#1307)
This commit is contained in:
parent
c1adec107f
commit
b9d5dcd782
1 changed files with 11 additions and 20 deletions
|
@ -164,27 +164,18 @@
|
|||
<link linkend="ini.display-errors">display_errors</link> directive.
|
||||
</para>
|
||||
<para>
|
||||
The default value
|
||||
is <constant>E_ALL</constant> &
|
||||
~<constant>E_NOTICE</constant> &
|
||||
~<constant>E_STRICT</constant> &
|
||||
~<constant>E_DEPRECATED</constant>. This setting does not
|
||||
show <constant>E_NOTICE</constant>, <constant>E_STRICT</constant>
|
||||
and <constant>E_DEPRECATED</constant> level errors. You may want
|
||||
to show them during development.
|
||||
The default value is <constant>E_ALL</constant>.
|
||||
</para>
|
||||
<para>
|
||||
Prior to PHP 8.0.0, the default value was:
|
||||
<userinput><constant>E_ALL</constant> &
|
||||
~<constant>E_NOTICE</constant> &
|
||||
~<constant>E_STRICT</constant> &
|
||||
~<constant>E_DEPRECATED</constant></userinput>.
|
||||
This means diagnostics of level <constant>E_NOTICE</constant>,
|
||||
<constant>E_STRICT</constant> and <constant>E_DEPRECATED</constant>
|
||||
were not shown.
|
||||
</para>
|
||||
<note>
|
||||
<para>Enabling <constant>E_NOTICE</constant> during development has
|
||||
some benefits. For debugging purposes: NOTICE messages will warn you
|
||||
about possible bugs in your code. For example, use of unassigned values
|
||||
is warned. It is extremely useful to find typos and
|
||||
to save time for debugging. NOTICE messages will warn you about bad style.
|
||||
For example, <literal>$arr[item]</literal> is better to be written as
|
||||
<literal>$arr['item']</literal> since PHP tries to treat
|
||||
<literal>"item"</literal> as constant. If it is not a constant, PHP assumes
|
||||
it is a string index for the array.
|
||||
</para>
|
||||
</note>
|
||||
<note>
|
||||
<title>PHP Constants outside of PHP</title>
|
||||
<para>
|
||||
|
|
Loading…
Reference in a new issue