From 307d38d9802834892d4eefc4659b287ddc6a363d Mon Sep 17 00:00:00 2001 From: Philip Olson Date: Sat, 13 Jul 2002 23:03:09 +0000 Subject: [PATCH] * Made clear this sets error_reporting directive at runtime (like ini_set) * Removed bitmask example section, constants are preferred. Bitmask use is still explained. * See also: display_errors and ini_set() * Added a couple more examples. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@88597 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../errorfunc/functions/error-reporting.xml | 83 +++++++++++-------- 1 file changed, 49 insertions(+), 34 deletions(-) diff --git a/reference/errorfunc/functions/error-reporting.xml b/reference/errorfunc/functions/error-reporting.xml index ef11cfe7a6..cf651a0d72 100644 --- a/reference/errorfunc/functions/error-reporting.xml +++ b/reference/errorfunc/functions/error-reporting.xml @@ -1,5 +1,5 @@ - + @@ -13,30 +13,62 @@ intlevel - Sets PHP's error reporting level and returns the old level. The - error reporting level is either a bitmask, or named constant. Using - named constants is strongly encouraged to ensure compatibility for - future versions. As error levels are added, the range of integers - increases, so older integer-based error levels will not always - behave as expected. + The error_reporting function sets the + error_reporting + directive at runtime. PHP has many levels of errors, using + this function sets that level for the duration (runtime) of + your script. + + + error_reporting sets PHP's error reporting level, + and returns the old level. The level parameter + takes on either a bitmask, or named constants. Using named constants + is strongly encouraged to ensure compatibility for future versions. As + error levels are added, the range of integers increases, so older + integer-based error levels will not always behave as expected. + + + Some example uses: + + - Error Integer changes + <function>error_reporting</function> examples ]]> - Follow the links of the constants to get their meanings: + + + The available error level constants are listed below. The actual + meanings of these error levels are described in the + error handling + section of the manual. - <function>error_reporting</function> bit values + <function>error_reporting</function> level constants and bit values @@ -122,25 +154,8 @@ error_reporting (E_ALL ^ E_NOTICE); // The same in both PHP 3 and 4
- - <function>error_reporting</function> examples - - - - + See also the display_errors + directive and ini_set.