betz Wed Oct 9 04:34:24 2002 EDT Modified files: /phpdoc/en/reference/errorfunc ini.xml Log: user notes intehrated, $php_errmsg is not global, some links Index: phpdoc/en/reference/errorfunc/ini.xml diff -u phpdoc/en/reference/errorfunc/ini.xml:1.2 phpdoc/en/reference/errorfunc/ini.xml:1.3 --- phpdoc/en/reference/errorfunc/ini.xml:1.2 Tue Oct 8 06:44:00 2002 +++ phpdoc/en/reference/errorfunc/ini.xml Wed Oct 9 04:34:24 2002 @@ -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>
-- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php