svn: /phpdoc/en/trunk/reference/funchand/functions/ register-shutdown-function.xml
| From: | Nikita Popov | Date: | Wed, 16 Nov 2011 18:10:24 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/funchand/functions/ register-shutdown-function.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-9043@lists.php.net to get a copy of this message | ||
nikic Wed, 16 Nov 2011 18:10:24 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=319357
Log:
Update register_shutdown_function documentation
Changed paths:
U phpdoc/en/trunk/reference/funchand/functions/register-shutdown-function.xml
Modified: phpdoc/en/trunk/reference/funchand/functions/register-shutdown-function.xml
===================================================================
--- phpdoc/en/trunk/reference/funchand/functions/register-shutdown-function.xml 2011-11-16 18:09:35
UTC (rev 319356)
+++ phpdoc/en/trunk/reference/funchand/functions/register-shutdown-function.xml 2011-11-16 18:10:24
UTC (rev 319357)
@@ -10,14 +10,13 @@
&reftitle.description;
<methodsynopsis>
<type>void</type><methodname>register_shutdown_function</methodname>
-
<methodparam><type>callback</type><parameter>function</parameter></methodparam>
+
<methodparam><type>callback</type><parameter>callback</parameter></methodparam>
<methodparam
choice="opt"><type>mixed</type><parameter>parameter</parameter></methodparam>
<methodparam
choice="opt"><type>mixed</type><parameter>...</parameter></methodparam>
</methodsynopsis>
<para>
- Registers the function named by <parameter>function</parameter> to be
- executed when script processing is complete or when <function>exit</function>
- is called.
+ Registers a <parameter>callback</parameter> to be executed after script
+ execution finishes or <function>exit</function> is called.
</para>
<para>
Multiple calls to <function>register_shutdown_function</function> can be
@@ -33,23 +32,15 @@
<para>
<variablelist>
<varlistentry>
- <term><parameter>function</parameter></term>
+ <term><parameter>callback</parameter></term>
<listitem>
<para>
- The shutdown function to register.
+ The shutdown callback to register.
</para>
<para>
- The shutdown functions are called as the part of the request so that
- it's possible to send the output from them. There is currently no way
- to process the data with output buffering functions in the shutdown
- function.
+ The shutdown callbacks are executed as the part of the request, so
+ it's possible to send output from them and access output buffers.
</para>
- <para>
- Shutdown functions are called after closing all opened output buffers
- thus, for example, its output will not be compressed if <link
- linkend="ini.zlib.output-compression">zlib.output_compression</link> is
- enabled.
- </para>
</listitem>
</varlistentry>
<varlistentry>
@@ -78,6 +69,14 @@
&return.void;
</para>
</refsect1>
+
+ <refsect1 role="errors">
+ &reftitle.errors;
+ <para>
+ If the passed callback is not callable a <constant>E_WARNING</constant>
+ level error will be generated.
+ </para>
+ </refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
@@ -139,16 +138,6 @@
&reftitle.notes;
<note>
<para>
- Typically undefined functions cause fatal errors in PHP, but when the
- <parameter>function</parameter> called with
- <function>register_shutdown_function</function> is undefined, an error
- of level <constant>E_WARNING</constant> is generated instead. Also,
- for reasons internal to PHP, this error will refer to
- <literal>Unknown</literal> at line #0.
- </para>
- </note>
- <note>
- <para>
Working directory of the script can change inside the shutdown function
under some web servers, e.g. Apache.
</para>