didou Sat Feb 17 20:03:06 2007 UTC
Modified files:
/phpdoc/en/reference/funchand/functions call-user-func-array.xml
call-user-func.xml
create-function.xml
func-get-arg.xml
func-get-args.xml
func-num-args.xml
function-exists.xml
get-defined-functions.xml
register-shutdown-function.xml
register-tick-function.xml
unregister-tick-function.xml
Log:
ref.funchand: switch to new style
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/funchand/functions/call-user-func-array.xml?r1=1.15&r2=1.16&diff_format=u
Index: phpdoc/en/reference/funchand/functions/call-user-func-array.xml
diff -u phpdoc/en/reference/funchand/functions/call-user-func-array.xml:1.15
phpdoc/en/reference/funchand/functions/call-user-func-array.xml:1.16
--- phpdoc/en/reference/funchand/functions/call-user-func-array.xml:1.15
Sat Feb 17 20:02:43 2007
+++ phpdoc/en/reference/funchand/functions/call-user-func-array.xml Sat Feb
17 20:03:06 2007
@@ -1,24 +1,57 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.15 $ -->
-<!-- splitted from ./en/functions/funchand.xml, last change in rev 1.10 -->
+<!-- $Revision: 1.16 $ -->
<refentry id="function.call-user-func-array">
<refnamediv>
<refname>call_user_func_array</refname>
<refpurpose>Call a user function given with an array of
parameters</refpurpose>
</refnamediv>
- <refsect1>
- <title>Description</title>
+
+ <refsect1 role="description">
+ &reftitle.description;
<methodsynopsis>
<type>mixed</type><methodname>call_user_func_array</methodname>
<methodparam><type>callback</type><parameter>function</parameter></methodparam>
<methodparam><type>array</type><parameter>param_arr</parameter></methodparam>
</methodsynopsis>
<para>
- Call a user defined function given by
- <parameter>function</parameter>, with
- the parameters in <parameter>param_arr</parameter>.
- For example:
+ Call a user defined <parameter>function</parameter> with the parameters in
+ <parameter>param_arr</parameter>.
</para>
+ </refsect1>
+
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ <para>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>function</parameter></term>
+ <listitem>
+ <para>
+ The function to be called.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>param_arr</parameter></term>
+ <listitem>
+ <para>
+ The parameters to be passed to the function, as an indexed array.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ Returns the function result, or &false; on error.
+ </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
<para>
<example>
<title><function>call_user_func_array</function> example</title>
@@ -47,12 +80,18 @@
</programlisting>
</example>
</para>
+ </refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
<para>
- See also
- <function>call_user_func</function>,
- and &seealso.callback;
+ <simplelist>
+ <member><function>call_user_func</function></member>
+ <member>&seealso.callback;</member>
+ </simplelist>
</para>
</refsect1>
+
</refentry>
<!-- Keep this comment at the end of the file
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/funchand/functions/call-user-func.xml?r1=1.15&r2=1.16&diff_format=u
Index: phpdoc/en/reference/funchand/functions/call-user-func.xml
diff -u phpdoc/en/reference/funchand/functions/call-user-func.xml:1.15
phpdoc/en/reference/funchand/functions/call-user-func.xml:1.16
--- phpdoc/en/reference/funchand/functions/call-user-func.xml:1.15 Sat Feb
17 20:02:43 2007
+++ phpdoc/en/reference/funchand/functions/call-user-func.xml Sat Feb 17
20:03:06 2007
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.15 $ -->
-<!-- splitted from ./en/functions/funchand.xml, last change in rev 1.1 -->
+<!-- $Revision: 1.16 $ -->
<refentry id="function.call-user-func">
<refnamediv>
<refname>call_user_func</refname>
<refpurpose>Call a user function given by the first parameter</refpurpose>
</refnamediv>
- <refsect1>
- <title>Description</title>
+
+ <refsect1 role="description">
+ &reftitle.description;
<methodsynopsis>
<type>mixed</type><methodname>call_user_func</methodname>
<methodparam><type>callback</type><parameter>function</parameter></methodparam>
@@ -15,12 +15,74 @@
<methodparam
choice="opt"><type>mixed</type><parameter>...</parameter></methodparam>
</methodsynopsis>
<para>
- Call a user defined function given by the
- <parameter>function</parameter> parameter. Take the
- following:
+ Call a user defined function given by the <parameter>function</parameter>
+ parameter.
+ </para>
+ </refsect1>
+
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ <para>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>function</parameter></term>
+ <listitem>
+ <para>
+ The function to be called. Class methods may also be invoked
+ statically using this function by passing
+ <literal>array($classname, $methodname)</literal> to this parameter.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>parameter</parameter></term>
+ <listitem>
+ <para>
+ Zero or more parameters to be passed to the function.
+ </para>
+ <note>
+ <para>
+ Note that the parameters for <function>call_user_func</function> are
+ not passed by reference.
+ <informalexample>
+ <programlisting role="php">
+<![CDATA[
+<?php
+function increment(&$var)
+{
+ $var++;
+}
+
+$a = 0;
+call_user_func('increment', $a);
+echo $a; // 0
+
+call_user_func_array('increment', array(&$a)); // You can use this instead
+echo $a; // 1
+?>
+]]>
+ </programlisting>
+ </informalexample>
+ </para>
+ </note>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ Returns the function result, or &false; on error.
</para>
+ </refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
<para>
- <informalexample>
+ <example>
+ <title><function>call_user_func</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
@@ -33,13 +95,9 @@
?>
]]>
</programlisting>
- </informalexample>
- </para>
- <para>
- Class methods may also be invoked statically using this function
- by passing <literal>array($classname, $methodname)</literal> to
- the <parameter>function</parameter> parameter.
- <informalexample>
+ </example>
+ <example>
+ <title>Using a class method</title>
<programlisting role="php">
<![CDATA[
<?php
@@ -56,40 +114,21 @@
?>
]]>
</programlisting>
- </informalexample>
+ </example>
</para>
- <note>
- <para>
- Note that the parameters for <function>call_user_func</function> are not
- passed by reference.
- <informalexample>
- <programlisting role="php">
-<![CDATA[
-<?php
-function increment(&$var)
-{
- $var++;
-}
-
-$a = 0;
-call_user_func('increment', $a);
-echo $a; // 0
+ </refsect1>
-call_user_func_array('increment', array(&$a)); // You can use this instead
-echo $a; // 1
-?>
-]]>
- </programlisting>
- </informalexample>
- </para>
- </note>
+ <refsect1 role="seealso">
+ &reftitle.seealso;
<para>
- See also:
- <function>is_callable</function>,
- <function>call_user_func_array</function>,
- &listendand; &seealso.callback;.
+ <simplelist>
+ <member><function>call_user_func_array</function></member>
+ <member><function>is_callable</function></member>
+ <member>&seealso.callback;</member>
+ </simplelist>
</para>
</refsect1>
+
</refentry>
<!-- Keep this comment at the end of the file
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/funchand/functions/create-function.xml?r1=1.8&r2=1.9&diff_format=u
Index: phpdoc/en/reference/funchand/functions/create-function.xml
diff -u phpdoc/en/reference/funchand/functions/create-function.xml:1.8
phpdoc/en/reference/funchand/functions/create-function.xml:1.9
--- phpdoc/en/reference/funchand/functions/create-function.xml:1.8 Sat Feb
17 20:02:43 2007
+++ phpdoc/en/reference/funchand/functions/create-function.xml Sat Feb 17
20:03:06 2007
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.8 $ -->
-<!-- splitted from ./en/functions/funchand.xml, last change in rev 1.1 -->
+<!-- $Revision: 1.9 $ -->
<refentry id="function.create-function">
<refnamediv>
<refname>create_function</refname>
<refpurpose>Create an anonymous (lambda-style) function</refpurpose>
</refnamediv>
- <refsect1>
- <title>Description</title>
+
+ <refsect1 role="description">
+ &reftitle.description;
<methodsynopsis>
<type>string</type><methodname>create_function</methodname>
<methodparam><type>string</type><parameter>args</parameter></methodparam>
@@ -15,24 +15,55 @@
</methodsynopsis>
<para>
Creates an anonymous function from the parameters passed, and
- returns a unique name for it. Usually the
- <parameter>args</parameter> will be passed as a single quote
- delimited string, and this is also recommended for the
- <parameter>code</parameter>. The reason for using single quoted
- strings, is to protect
- the variable names from parsing, otherwise, if you use double
- quotes there will be a need to escape the variable names, e.g.
- <literal>\$avar</literal>.
+ returns a unique name for it.
</para>
+ </refsect1>
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ <para>
+ Usually these parameters will be passed as single quote delimited strings.
+ The reason for using single quoted strings, is to protect the variable
+ names from parsing, otherwise, if you use double quotes there will be a
+ need to escape the variable names, e.g. <literal>\$avar</literal>.
+ <variablelist>
+ <varlistentry>
+ <term><parameter>args</parameter></term>
+ <listitem>
+ <para>
+ The function arguments.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>code</parameter></term>
+ <listitem>
+ <para>
+ The function code.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
<para>
- You can use this function, to (for example) create a function
- from information gathered at run time:
+ Returns a unique function name as a string, or &false; on error.
</para>
+ </refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
<para>
<example>
<title>
Creating an anonymous function with <function>create_function</function>
</title>
+ <para>
+ You can use this function, to (for example) create a function from
+ information gathered at run time:
+ </para>
<programlisting role="php">
<![CDATA[
<?php
@@ -95,9 +126,7 @@
?>
]]>
</programlisting>
- <para>
- and when you run the code above, the output will be:
- </para>
+ &example.outputs;
<screen>
<![CDATA[
Using the first array of anonymous functions
@@ -134,9 +163,7 @@
?>
]]>
</programlisting>
- <para>
- outputs:
- </para>
+ &example.outputs;
<screen>
<![CDATA[
Array
@@ -161,9 +188,7 @@
?>
]]>
</programlisting>
- <para>
- outputs:
- </para>
+ &example.outputs;
<screen>
<![CDATA[
Array
@@ -188,9 +213,7 @@
?>
]]>
</programlisting>
- <para>
- outputs:
- </para>
+ &example.outputs;
<screen>
<![CDATA[
Array
@@ -205,6 +228,7 @@
</example>
</para>
</refsect1>
+
</refentry>
<!-- Keep this comment at the end of the file
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/funchand/functions/func-get-arg.xml?r1=1.9&r2=1.10&diff_format=u
Index: phpdoc/en/reference/funchand/functions/func-get-arg.xml
diff -u phpdoc/en/reference/funchand/functions/func-get-arg.xml:1.9
phpdoc/en/reference/funchand/functions/func-get-arg.xml:1.10
--- phpdoc/en/reference/funchand/functions/func-get-arg.xml:1.9 Sat Feb 17
20:02:43 2007
+++ phpdoc/en/reference/funchand/functions/func-get-arg.xml Sat Feb 17
20:03:06 2007
@@ -1,37 +1,65 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.9 $ -->
-<!-- splitted from ./en/functions/funchand.xml, last change in rev 1.1 -->
+<!-- $Revision: 1.10 $ -->
<refentry id="function.func-get-arg">
<refnamediv>
<refname>func_get_arg</refname>
<refpurpose>Return an item from the argument list</refpurpose>
</refnamediv>
- <refsect1>
- <title>Description</title>
+
+ <refsect1 role="description">
+ &reftitle.description;
<methodsynopsis>
<type>mixed</type><methodname>func_get_arg</methodname>
<methodparam><type>int</type><parameter>arg_num</parameter></methodparam>
</methodsynopsis>
- <simpara>
- Returns the argument which is at the
- <parameter>arg_num</parameter>'th offset into a user-defined
- function's argument list. Function arguments are counted starting
- from zero. <function>func_get_arg</function> will generate a
- warning if called from outside of a function definition.
- This function cannot be used directly as a function parameter. Instead,
- its result may be assigned to a variable, which can then be passed to
- the function.
- </simpara>
- <simpara>
- If <parameter>arg_num</parameter> is greater than the number of
- arguments actually passed, a warning will be generated and
- <function>func_get_arg</function> will return &false;.
- </simpara>
+ <para>
+ Gets the specified argument from a user-defined function's argument list.
+ </para>
+ <para>
+ This function may be used in conjunction with
+ <function>func_get_args</function> and <function>func_num_args</function>
+ to allow user-defined functions to accept variable-length argument lists.
+ </para>
+ </refsect1>
- ¬e.funcnoparam;
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ <para>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>arg_num</parameter></term>
+ <listitem>
+ <para>
+ The argument offset. Function arguments are counted starting from
+ zero.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ Returns the specified argument, or &false; on error.
+ </para>
+ </refsect1>
+ <refsect1 role="errors">
+ &reftitle.errors;
<para>
- <informalexample>
+ Generates a warning if called from outside of a user-defined function, or
+ if <parameter>arg_num</parameter> is greater than the number of arguments
+ actually passed.
+ </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ <example>
+ <title><function>func_get_arg</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
@@ -40,7 +68,7 @@
$numargs = func_num_args();
echo "Number of arguments: $numargs<br />\n";
if ($numargs >= 2) {
- echo "Second argument is: " . func_get_arg(1) . "<br />\n";
+ echo "Second argument is: " . func_get_arg(1) . "<br />\n";
}
}
@@ -48,15 +76,31 @@
?>
]]>
</programlisting>
- </informalexample>
+ </example>
+ </para>
+ </refsect1>
+
+ <refsect1 role="notes">
+ &reftitle.notes;
+ ¬e.funcnoparam;
+ <note>
+ <simpara>
+ This function returns a copy of the passed arguments only, and does not
+ account for default (non-passed) arguments.
+ </simpara>
+ </note>
+ </refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <para>
+ <simplelist>
+ <member><function>func_get_args</function></member>
+ <member><function>func_num_args</function></member>
+ </simplelist>
</para>
- <simpara>
- <function>func_get_arg</function> may be used in conjunction with
- <function>func_num_args</function> and
- <function>func_get_args</function> to allow user-defined
- functions to accept variable-length argument lists.
- </simpara>
</refsect1>
+
</refentry>
<!-- Keep this comment at the end of the file
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/funchand/functions/func-get-args.xml?r1=1.11&r2=1.12&diff_format=u
Index: phpdoc/en/reference/funchand/functions/func-get-args.xml
diff -u phpdoc/en/reference/funchand/functions/func-get-args.xml:1.11
phpdoc/en/reference/funchand/functions/func-get-args.xml:1.12
--- phpdoc/en/reference/funchand/functions/func-get-args.xml:1.11 Sat Feb
17 20:02:43 2007
+++ phpdoc/en/reference/funchand/functions/func-get-args.xml Sat Feb 17
20:03:06 2007
@@ -1,37 +1,47 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.11 $ -->
-<!-- splitted from ./en/functions/funchand.xml, last change in rev 1.1 -->
+<!-- $Revision: 1.12 $ -->
<refentry id="function.func-get-args">
<refnamediv>
<refname>func_get_args</refname>
<refpurpose>Returns an array comprising a function's argument
list</refpurpose>
</refnamediv>
- <refsect1>
- <title>Description</title>
+
+ <refsect1 role="description">
+ &reftitle.description;
<methodsynopsis>
<type>array</type><methodname>func_get_args</methodname>
<void/>
</methodsynopsis>
- <simpara>
+ <para>
+ Gets an array of the function's argument list.
+ </para>
+ <para>
+ This function may be used in conjunction with
+ <function>func_get_arg</function> and <function>func_num_args</function>
+ to allow user-defined functions to accept variable-length argument lists.
+ </para>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
Returns an array in which each element is a copy of the corresponding
- member of the current user-defined function's argument
- list. <function>func_get_args</function> will generate a warning
- if called from outside of a function definition.
- This function cannot be used directly as a function parameter. Instead,
- its result may be assigned to a variable, which can then be passed to
- the function.
- </simpara>
- <note>
- <simpara>
- This function returns a copy of the passed arguments only, and does not
- account for default (non-passed) arguments.
- </simpara>
- </note>
+ member of the current user-defined function's argument list.
+ </para>
+ </refsect1>
- ¬e.funcnoparam;
+ <refsect1 role="errors">
+ &reftitle.errors;
+ <para>
+ Generates a warning if called from outside of a user-defined function.
+ </para>
+ </refsect1>
+ <refsect1 role="examples">
+ &reftitle.examples;
<para>
- <informalexample>
+ <example>
+ <title><function>func_get_args</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
@@ -52,15 +62,31 @@
?>
]]>
</programlisting>
- </informalexample>
+ </example>
+ </para>
+ </refsect1>
+
+ <refsect1 role="notes">
+ &reftitle.notes;
+ ¬e.funcnoparam;
+ <note>
+ <simpara>
+ This function returns a copy of the passed arguments only, and does not
+ account for default (non-passed) arguments.
+ </simpara>
+ </note>
+ </refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <para>
+ <simplelist>
+ <member><function>func_get_arg</function></member>
+ <member><function>func_num_args</function></member>
+ </simplelist>
</para>
- <simpara>
- <function>func_get_args</function> may be used in conjunction
- with <function>func_num_args</function> and
- <function>func_get_arg</function> to allow user-defined functions
- to accept variable-length argument lists.
- </simpara>
</refsect1>
+
</refentry>
<!-- Keep this comment at the end of the file
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/funchand/functions/func-num-args.xml?r1=1.8&r2=1.9&diff_format=u
Index: phpdoc/en/reference/funchand/functions/func-num-args.xml
diff -u phpdoc/en/reference/funchand/functions/func-num-args.xml:1.8
phpdoc/en/reference/funchand/functions/func-num-args.xml:1.9
--- phpdoc/en/reference/funchand/functions/func-num-args.xml:1.8 Sat Feb
17 20:02:43 2007
+++ phpdoc/en/reference/funchand/functions/func-num-args.xml Sat Feb 17
20:03:06 2007
@@ -1,30 +1,47 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.8 $ -->
-<!-- splitted from ./en/functions/funchand.xml, last change in rev 1.1 -->
+<!-- $Revision: 1.9 $ -->
<refentry id="function.func-num-args">
<refnamediv>
<refname>func_num_args</refname>
<refpurpose>Returns the number of arguments passed to the
function</refpurpose>
</refnamediv>
- <refsect1>
- <title>Description</title>
+
+ <refsect1 role="description">
+ &reftitle.description;
<methodsynopsis>
<type>int</type><methodname>func_num_args</methodname>
<void/>
</methodsynopsis>
- <simpara>
- Returns the number of arguments passed into the current
- user-defined function. <function>func_num_args</function> will
- generate a warning if called from outside of a user-defined function.
- This function cannot be used directly as a function parameter. Instead,
- its result may be assigned to a variable, which can then be passed to
- the function.
- </simpara>
+ <para>
+ Gets the number of arguments passed to the function.
+ </para>
+ <para>
+ This function may be used in conjunction with
+ <function>func_get_arg</function> and <function>func_get_args</function>
+ to allow user-defined functions to accept variable-length argument lists.
+ </para>
+ </refsect1>
- ¬e.funcnoparam;
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ Returns the number of arguments passed into the current user-defined
+ function.
+ </para>
+ </refsect1>
+ <refsect1 role="errors">
+ &reftitle.errors;
<para>
- <informalexample>
+ Generates a warning if called from outside of a user-defined function.
+ </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ <example>
+ <title><function>func_num_args</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
@@ -38,15 +55,25 @@
?>
]]>
</programlisting>
- </informalexample>
+ </example>
+ </para>
+ </refsect1>
+
+ <refsect1 role="notes">
+ &reftitle.notes;
+ ¬e.funcnoparam;
+ </refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <para>
+ <simplelist>
+ <member><function>func_get_arg</function></member>
+ <member><function>func_get_args</function></member>
+ </simplelist>
</para>
- <simpara>
- <function>func_num_args</function> may be used in conjunction
- with <function>func_get_arg</function> and
- <function>func_get_args</function> to allow user-defined
- functions to accept variable-length argument lists.
- </simpara>
</refsect1>
+
</refentry>
<!-- Keep this comment at the end of the file
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/funchand/functions/function-exists.xml?r1=1.5&r2=1.6&diff_format=u
Index: phpdoc/en/reference/funchand/functions/function-exists.xml
diff -u phpdoc/en/reference/funchand/functions/function-exists.xml:1.5
phpdoc/en/reference/funchand/functions/function-exists.xml:1.6
--- phpdoc/en/reference/funchand/functions/function-exists.xml:1.5 Sat Feb
17 20:02:43 2007
+++ phpdoc/en/reference/funchand/functions/function-exists.xml Sat Feb 17
20:03:06 2007
@@ -1,23 +1,58 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.5 $ -->
-<!-- splitted from ./en/functions/funchand.xml, last change in rev 1.1 -->
+<!-- $Revision: 1.6 $ -->
<refentry id="function.function-exists">
<refnamediv>
<refname>function_exists</refname>
<refpurpose>Return &true; if the given function has been defined</refpurpose>
</refnamediv>
- <refsect1>
- <title>Description</title>
+
+ <refsect1 role="description">
+ &reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>function_exists</methodname>
<methodparam><type>string</type><parameter>function_name</parameter></methodparam>
</methodsynopsis>
<para>
Checks the list of defined functions, both built-in (internal) and
- user-defined, for <parameter>function_name</parameter>. &return.success;
+ user-defined, for <parameter>function_name</parameter>.
</para>
+ </refsect1>
+
+ <refsect1 role="parameters">
+ &reftitle.parameters;
<para>
- <informalexample>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>function_name</parameter></term>
+ <listitem>
+ <para>
+ The function name, as a string.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ Returns &true; if <parameter>function_name</parameter> exists and is a
+ function, &false; otherwise.
+ </para>
+ <note>
+ <para>
+ This function will return &false; for constructs, such as
+ <function>include_once</function> and <function>echo</function>.
+ </para>
+ </note>
+ </refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ <example>
+ <title><function>function_exists</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
@@ -29,22 +64,32 @@
?>
]]>
</programlisting>
- </informalexample>
- </para>
- <para>
- Note that a function name may exist even if the function itself
- is unusable due to configuration or compiling options (with the
- <link linkend="ref.image">image</link> functions being an example).
- Also note that <function>function_exists</function> will return
- &false; for constructs, such as <function>include_once</function>
- and <function>echo</function>.
+ </example>
</para>
+ </refsect1>
+
+ <refsect1 role="notes">
+ &reftitle.notes;
+ <note>
+ <para>
+ A function name may exist even if the function itself is unusable due to
+ configuration or compiling options (with the <link
+ linkend="ref.image">image</link> functions being an example).
+ </para>
+ </note>
+ </refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
<para>
- See also <function>method_exists</function>,
- <function>is_callable</function> and
- <function>get_defined_functions</function>.
+ <simplelist>
+ <member><function>method_exists</function></member>
+ <member><function>is_callable</function></member>
+ <member><function>get_defined_functions</function></member>
+ </simplelist>
</para>
</refsect1>
+
</refentry>
<!-- Keep this comment at the end of the file
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/funchand/functions/get-defined-functions.xml?r1=1.6&r2=1.7&diff_format=u
Index: phpdoc/en/reference/funchand/functions/get-defined-functions.xml
diff -u phpdoc/en/reference/funchand/functions/get-defined-functions.xml:1.6
phpdoc/en/reference/funchand/functions/get-defined-functions.xml:1.7
--- phpdoc/en/reference/funchand/functions/get-defined-functions.xml:1.6
Sat Feb 17 20:02:43 2007
+++ phpdoc/en/reference/funchand/functions/get-defined-functions.xml Sat Feb
17 20:03:06 2007
@@ -1,26 +1,38 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
-<!-- splitted from ./en/functions/funchand.xml, last change in rev 1.6 -->
+<!-- $Revision: 1.7 $ -->
<refentry id="function.get-defined-functions">
<refnamediv>
<refname>get_defined_functions</refname>
<refpurpose>Returns an array of all defined functions</refpurpose>
</refnamediv>
- <refsect1>
- <title>Description</title>
+
+ <refsect1 role="description">
+ &reftitle.description;
<methodsynopsis>
<type>array</type><methodname>get_defined_functions</methodname>
<void/>
</methodsynopsis>
<para>
- This function returns an multidimensional array containing a list of
- all defined functions, both built-in (internal) and user-defined. The
- internal functions will be accessible via
- <varname>$arr["internal"]</varname>, and the user defined ones using
- <varname>$arr["user"]</varname> (see example below).
+ Gets an array of all defined functions.
</para>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
<para>
- <informalexample>
+ Returns an multidimensional array containing a list of all defined
+ functions, both built-in (internal) and user-defined. The internal
+ functions will be accessible via <varname>$arr["internal"]</varname>, and
+ the user defined ones using <varname>$arr["user"]</varname> (see example
+ below).
+ </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ <example>
+ <title><function>get_defined_functions</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
@@ -35,9 +47,7 @@
?>
]]>
</programlisting>
- <para>
- Will output something along the lines of:
- </para>
+ &example.outputs.similar;
<screen>
<![CDATA[
Array
@@ -64,15 +74,21 @@
)
]]>
</screen>
- </informalexample>
+ </example>
</para>
+ </refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
<para>
- See also
- <function>function_exists</function>,
- <function>get_defined_vars</function> and
- <function>get_defined_constants</function>.
+ <simplelist>
+ <member><function>function_exists</function></member>
+ <member><function>get_defined_vars</function></member>
+ <member><function>get_defined_constants</function></member>
+ </simplelist>
</para>
</refsect1>
+
</refentry>
<!-- Keep this comment at the end of the file
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/funchand/functions/register-shutdown-function.xml?r1=1.14&r2=1.15&diff_format=u
Index: phpdoc/en/reference/funchand/functions/register-shutdown-function.xml
diff -u
phpdoc/en/reference/funchand/functions/register-shutdown-function.xml:1.14
phpdoc/en/reference/funchand/functions/register-shutdown-function.xml:1.15
--- phpdoc/en/reference/funchand/functions/register-shutdown-function.xml:1.14
Sat Feb 17 20:02:43 2007
+++ phpdoc/en/reference/funchand/functions/register-shutdown-function.xml
Sat Feb 17 20:03:06 2007
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.14 $ -->
-<!-- splitted from ./en/functions/funchand.xml, last change in rev 1.1 -->
+<!-- $Revision: 1.15 $ -->
<refentry id="function.register-shutdown-function">
<refnamediv>
<refname>register_shutdown_function</refname>
<refpurpose>Register a function for execution on shutdown</refpurpose>
</refnamediv>
- <refsect1>
- <title>Description</title>
+
+ <refsect1 role="description">
+ &reftitle.description;
<methodsynopsis>
<type>void</type><methodname>register_shutdown_function</methodname>
<methodparam><type>callback</type><parameter>function</parameter></methodparam>
@@ -46,6 +46,46 @@
passing additional parameters to
<function>register_shutdown_function</function>.
</para>
+ </refsect1>
+
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ <para>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>function</parameter></term>
+ <listitem>
+ <para>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>parameter</parameter></term>
+ <listitem>
+ <para>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>...</parameter></term>
+ <listitem>
+ <para>
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ &return.void;
+ </para>
+ </refsect1>
+
+ <refsect1 role="notes">
+ &reftitle.notes;
<note>
<para>
Typically undefined functions cause fatal errors in PHP, but when the
@@ -62,18 +102,26 @@
under some web servers, e.g. Apache.
</para>
</note>
- <note>
- <para>
- Shutdown function is called during the script shutdown so headers are
- always already sent.
- </para>
- </note>
+ <note>
+ <para>
+ Shutdown function is called during the script shutdown so headers are
+ always already sent.
+ </para>
+ </note>
+ </refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
<para>
- See also <link linkend="ini.auto-append-file">auto_append_file</link>,
- <function>exit</function>, and the section on
- <link linkend="features.connection-handling">connection handling</link>.
+ <simplelist>
+ <member><link
linkend="ini.auto-append-file">auto_append_file</link></member>
+ <member><function>exit</function></member>
+ <member>The section on <link
+ linkend="features.connection-handling">connection handling</link></member>
+ </simplelist>
</para>
</refsect1>
+
</refentry>
<!-- Keep this comment at the end of the file
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/funchand/functions/register-tick-function.xml?r1=1.12&r2=1.13&diff_format=u
Index: phpdoc/en/reference/funchand/functions/register-tick-function.xml
diff -u phpdoc/en/reference/funchand/functions/register-tick-function.xml:1.12
phpdoc/en/reference/funchand/functions/register-tick-function.xml:1.13
--- phpdoc/en/reference/funchand/functions/register-tick-function.xml:1.12
Sat Feb 17 20:02:43 2007
+++ phpdoc/en/reference/funchand/functions/register-tick-function.xml Sat Feb
17 20:03:06 2007
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.12 $ -->
-<!-- splitted from ./en/functions/funchand.xml, last change in rev 1.12 -->
+<!-- $Revision: 1.13 $ -->
<refentry id="function.register-tick-function">
<refnamediv>
<refname>register_tick_function</refname>
<refpurpose>Register a function for execution on each tick</refpurpose>
</refnamediv>
- <refsect1>
- <title>Description</title>
+
+ <refsect1 role="description">
+ &reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>register_tick_function</methodname>
<methodparam><type>callback</type><parameter>function</parameter></methodparam>
@@ -15,12 +15,51 @@
<methodparam
choice="opt"><type>mixed</type><parameter>...</parameter></methodparam>
</methodsynopsis>
<simpara>
- Registers the function named by <parameter>func</parameter> to be
- executed when a <link
- linkend="control-structures.declare.ticks">tick</link> is
- called. Also, you may pass an array consisting of an object and a
- method as the <parameter>func</parameter>.
+ Registers the given <parameter>function</parameter> to be executed when a
+ <link linkend="control-structures.declare.ticks">tick</link> is called.
</simpara>
+ </refsect1>
+
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ <para>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>function</parameter></term>
+ <listitem>
+ <para>
+ The function name as a string, or an array consisting of an object and
+ a method.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>arg</parameter></term>
+ <listitem>
+ <para>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>...</parameter></term>
+ <listitem>
+ <para>
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ &return.success;
+ </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
<para>
<example>
<title><function>register_tick_function</function> example</title>
@@ -38,18 +77,29 @@
</programlisting>
</example>
</para>
+ </refsect1>
+
+ <refsect1 role="notes">
+ &reftitle.notes;
<warning>
- <simpara>
+ <para>
<function>register_tick_function</function> should not be used with
threaded web server modules. Ticks are not working in ZTS mode and may
crash your web server.
- </simpara>
+ </para>
</warning>
+ </refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
<para>
- See also <link linkend="control-structures.declare">declare</link> and
- <function>unregister_tick_function</function>.
+ <simplelist>
+ <member><link linkend="control-structures.declare">declare</link></member>
+ <member><function>unregister_tick_function</function></member>
+ </simplelist>
</para>
</refsect1>
+
</refentry>
<!-- Keep this comment at the end of the file
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/funchand/functions/unregister-tick-function.xml?r1=1.5&r2=1.6&diff_format=u
Index: phpdoc/en/reference/funchand/functions/unregister-tick-function.xml
diff -u phpdoc/en/reference/funchand/functions/unregister-tick-function.xml:1.5
phpdoc/en/reference/funchand/functions/unregister-tick-function.xml:1.6
--- phpdoc/en/reference/funchand/functions/unregister-tick-function.xml:1.5
Sat Feb 17 20:02:43 2007
+++ phpdoc/en/reference/funchand/functions/unregister-tick-function.xml Sat Feb
17 20:03:06 2007
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.5 $ -->
-<!-- splitted from ./en/functions/funchand.xml, last change in rev 1.12 -->
+<!-- $Revision: 1.6 $ -->
<refentry id="function.unregister-tick-function">
<refnamediv>
<refname>unregister_tick_function</refname>
<refpurpose>De-register a function for execution on each tick</refpurpose>
</refnamediv>
- <refsect1>
- <title>Description</title>
+
+ <refsect1 role="description">
+ &reftitle.description;
<methodsynopsis>
<type>void</type><methodname>unregister_tick_function</methodname>
<methodparam><type>string</type><parameter>function_name</parameter></methodparam>
@@ -19,6 +19,39 @@
called.
</simpara>
</refsect1>
+
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ <para>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>function_name</parameter></term>
+ <listitem>
+ <para>
+ The function name, as a string.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ &return.void;
+ </para>
+ </refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <para>
+ <simplelist>
+ <member><function>register_tick_function</function></member>
+ </simplelist>
+ </para>
+ </refsect1>
+
</refentry>
<!-- Keep this comment at the end of the file