derick Sat Feb 7 14:02:34 2004 EDT
Modified files:
/phpdoc/en/reference/errorfunc/functions set-error-handler.xml
Log:
- Document 2nd parameter to set_error_handler
http://cvs.php.net/diff.php/phpdoc/en/reference/errorfunc/functions/set-error-handler.xml?r1=1.18&r2=1.19&ty=u
Index: phpdoc/en/reference/errorfunc/functions/set-error-handler.xml
diff -u phpdoc/en/reference/errorfunc/functions/set-error-handler.xml:1.18
phpdoc/en/reference/errorfunc/functions/set-error-handler.xml:1.19
--- phpdoc/en/reference/errorfunc/functions/set-error-handler.xml:1.18 Thu Jan 15
07:42:17 2004
+++ phpdoc/en/reference/errorfunc/functions/set-error-handler.xml Sat Feb 7
14:02:34 2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.18 $ -->
+<!-- $Revision: 1.19 $ -->
<!-- splitted from ./en/functions/errorfunc.xml, last change in rev 1.1 -->
<refentry id="function.set-error-handler">
<refnamediv>
@@ -13,6 +13,7 @@
<methodsynopsis>
<type>string</type><methodname>set_error_handler</methodname>
<methodparam><type>callback</type><parameter>error_handler</parameter></methodparam>
+ <methodparam
choice="opt"><type>int</type><parameter>error_types</parameter></methodparam>
</methodsynopsis>
<para>
Sets a user function (<parameter>error_handler</parameter>) to handle
@@ -24,6 +25,16 @@
<function>trigger_error</function>).
</para>
<para>
+ The second parameter <parameter>error_types</parameter> was introduced in
+ PHP 5 and can be used to mask the triggering of the
+ <parameter>error_handler</parameter> function just like the <link
+ linkend="ini.error-reporting">error_reporting</link> ini setting controls
+ which errors are shown. Without this mask set the
+ <parameter>error_handler</parameter> will be called for every error
+ unregardless to the setting of the <link
+ linkend="ini.error-reporting">error_reporting</link> setting.
+ </para>
+ <para>
The user function needs to accept two parameters: the error code, and a
string describing the error. From PHP 4.0.2, three optional
parameters are supplied: the filename in which the error occurred, the
@@ -137,7 +148,7 @@
]]>
</programlisting>
<para>
- And when you run this sample script, the output will be :
+ And when you run this sample script, the output will be:
</para>
<screen>
<![CDATA[
@@ -197,6 +208,12 @@
error handler cannot be called since it is not registered at that time.
</para>
</note>
+ <note>
+ <para>
+ The second parameter <parameter>error_types</parameter> was introduced
+ in PHP 5.
+ </para>
+ </note>
<para>
See also <function>error_reporting</function>,
<function>restore_error_handler</function>,