diff --git a/reference/errorfunc/ini.xml b/reference/errorfunc/ini.xml index 701288b6a4..d307315bef 100644 --- a/reference/errorfunc/ini.xml +++ b/reference/errorfunc/ini.xml @@ -1,5 +1,5 @@ - +
&reftitle.runtime; &extension.runtime; @@ -17,7 +17,7 @@ error_reporting - NULL + E_ALL & ~E_NOTICE PHP_INI_ALL @@ -120,14 +120,23 @@ display_errors directive. - The default value does not show E_NOTICE level - errors. You may want to show them during development. + In PHP 4 the default value does not show E_NOTICE + level errors. You may want to show them during development. + + Enabling E_NOTICE 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. + + - In PHP 4, the default setting is - E_ALL & ~E_NOTICE, meaning to display all errors - and warnings which are not E_NOTICE-level. In PHP 3, the default - setting is (E_ERROR | E_WARNING | E_PARSE), + In PHP 3, the default setting is + (E_ERROR | E_WARNING | E_PARSE), meaning the same thing. Note, however, that since constants are not supported in PHP 3's php3.ini, the error_reporting setting there must be numeric; hence, it is 7. @@ -249,7 +258,8 @@ If enabled, the last error message will always be present in the - global variable $php_errormsg. + variable $php_errormsg. +