hholzgra Sat Oct 26 16:40:43 2002 EDT Modified files: /phpdoc/en/language types.xml /phpdoc/en/reference/array/functions array-filter.xml array-map.xml array-reduce.xml array-walk.xml uasort.xml uksort.xml /phpdoc/en/reference/errorfunc/functions set-error-handler.xml /phpdoc/en/reference/filesystem/functions fread.xml /phpdoc/en/reference/funchand/functions call-user-func-array.xml call-user-func.xml register-shutdown-function.xml register-tick-function.xml unregister-tick-function.xml Log: ongoing changes to callback pseudo-type
Index: phpdoc/en/language/types.xml diff -u phpdoc/en/language/types.xml:1.89 phpdoc/en/language/types.xml:1.90 --- phpdoc/en/language/types.xml:1.89 Sat Oct 26 02:58:16 2002 +++ phpdoc/en/language/types.xml Sat Oct 26 16:40:41 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.89 $ --> +<!-- $Revision: 1.90 $ --> <chapter id="language.types"> <title>Types</title> @@ -1870,7 +1870,17 @@ methods. </para> <para> - A PHP function is simply passed by its name as a string. + A PHP function is simply passed by its name as a string. You can + pass any builtin or user defined function with the exception of + <function>array</function>, + <function>echo</function>, + <function>empty</function>, + <function>eval</function>, + <function>exit</function>, + <function>isset</function>, + <function>list</function>, + <function>print</function> and + <function>unset</function>. </para> <para> A method of an instantiated object is passed as an array containing Index: phpdoc/en/reference/array/functions/array-filter.xml diff -u phpdoc/en/reference/array/functions/array-filter.xml:1.4 phpdoc/en/reference/array/functions/array-filter.xml:1.5 --- phpdoc/en/reference/array/functions/array-filter.xml:1.4 Sun May 12 04:19:28 2002 +++ phpdoc/en/reference/array/functions/array-filter.xml Sat Oct 26 16:40:42 +2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <!-- splitted from ./en/functions/array.xml, last change in rev 1.62 --> <refentry id="function.array-filter"> <refnamediv> @@ -13,12 +13,12 @@ <methodsynopsis> <type>array</type><methodname>array_filter</methodname> <methodparam><type>array</type><parameter>input</parameter></methodparam> - <methodparam choice="opt"><type>mixed</type><parameter>callback</parameter></methodparam> + <methodparam +choice="opt"><type>callback</type><parameter>function</parameter></methodparam> </methodsynopsis> <para> <function>array_filter</function> returns an array containing all the elements of <parameter>input</parameter> - filtered according a callback function. If the + filtered according a callback <parameter>function</parameter>. If the <parameter>input</parameter> is an associative array the keys are preserved. </para> @@ -68,7 +68,6 @@ </para> </example> </para> - ¬e.func-callback; <para> Users may not change the array itself from the callback function. e.g. Add/delete an element, unset the array that Index: phpdoc/en/reference/array/functions/array-map.xml diff -u phpdoc/en/reference/array/functions/array-map.xml:1.4 phpdoc/en/reference/array/functions/array-map.xml:1.5 --- phpdoc/en/reference/array/functions/array-map.xml:1.4 Sun May 12 04:19:28 2002 +++ phpdoc/en/reference/array/functions/array-map.xml Sat Oct 26 16:40:42 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <!-- splitted from ./en/functions/array.xml, last change in rev 1.62 --> <refentry id="function.array-map"> <refnamediv> @@ -12,15 +12,17 @@ <title>Description</title> <methodsynopsis> <type>array</type><methodname>array_map</methodname> - <methodparam><type>mixed</type><parameter>callback</parameter></methodparam> + <methodparam><type>callback</type><parameter>function</parameter></methodparam> <methodparam><type>array</type><parameter>arr1</parameter></methodparam> <methodparam choice="opt"><type>array</type><parameter>arr2...</parameter></methodparam> </methodsynopsis> <para> <function>array_map</function> returns an array containing all the elements of <parameter>arr1</parameter> after applying the - callback function to each one. The number of parameters that the - callback function accepts should match the number of arrays + callback <parameter>function</parameter> to each one. + The number of parameters that the callback + <parameter>function</parameter> accepts + should match the number of arrays passed to the <function>array_map</function> </para> <para> Index: phpdoc/en/reference/array/functions/array-reduce.xml diff -u phpdoc/en/reference/array/functions/array-reduce.xml:1.4 phpdoc/en/reference/array/functions/array-reduce.xml:1.5 --- phpdoc/en/reference/array/functions/array-reduce.xml:1.4 Sun May 12 04:19:28 2002 +++ phpdoc/en/reference/array/functions/array-reduce.xml Sat Oct 26 16:40:42 +2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <!-- splitted from ./en/functions/array.xml, last change in rev 1.2 --> <refentry id="function.array-reduce"> <refnamediv> @@ -14,12 +14,12 @@ <methodsynopsis> <type>mixed</type><methodname>array_reduce</methodname> <methodparam><type>array</type><parameter>input</parameter></methodparam> - <methodparam><type>mixed</type><parameter>callback</parameter></methodparam> + <methodparam><type>callback</type><parameter>function</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>initial</parameter></methodparam> </methodsynopsis> <para> <function>array_reduce</function> applies iteratively the - <parameter>callback</parameter> function to the elements of the + <parameter>function</parameter> function to the elements of the array <parameter>input</parameter>, so as to reduce the array to a single value. If the optional <parameter>initial</parameter> is available, it will be used at the beginning of the process, or as Index: phpdoc/en/reference/array/functions/array-walk.xml diff -u phpdoc/en/reference/array/functions/array-walk.xml:1.5 phpdoc/en/reference/array/functions/array-walk.xml:1.6 --- phpdoc/en/reference/array/functions/array-walk.xml:1.5 Thu Oct 17 07:25:32 2002 +++ phpdoc/en/reference/array/functions/array-walk.xml Sat Oct 26 16:40:42 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <!-- splitted from ./en/functions/array.xml, last change in rev 1.2 --> <refentry id="function.array-walk"> <refnamediv> @@ -13,30 +13,23 @@ <methodsynopsis> <type>int</type><methodname>array_walk</methodname> <methodparam><type>array</type><parameter>array</parameter></methodparam> - <methodparam><type>string</type><parameter>func</parameter></methodparam> + <methodparam><type>callback</type><parameter>function</parameter></methodparam> <methodparam choice="opt"><type>mixed</type><parameter>userdata</parameter></methodparam> </methodsynopsis> <simpara> - Applies the user-defined function <parameter>func</parameter> to each + Applies the user-defined function <parameter>function</parameter> to each element of the <parameter>array</parameter> array. Typically, - <parameter>func</parameter> takes on two parameters. + <parameter>function</parameter> takes on two parameters. The <parameter>array</parameter> parameter's value being the first, and the key/index second. If the optional <parameter>userdata</parameter> parameter is supplied, it will be passed as the third parameter to - function <parameter>func</parameter>. + the callback <parameter>function</parameter>. </simpara> <simpara> - <parameter>func</parameter> must be a user-defined function, not a - built-in PHP function such as <function>strtolower</function> or - <function>stripslashes</function>. The user-defined function can - use built-in PHP functions. - </simpara> - ¬e.func-callback; - <simpara> - If function <parameter>func</parameter> requires more parameters than + If function <parameter>function</parameter> requires more parameters than given to it, an error of level <link linkend="errorfunc.constants"> E_WARNING</link> will be generated each time <function>array_walk</function> - calls <parameter>func</parameter>. These warnings may be suppressed by + calls <parameter>function</parameter>. These warnings may be suppressed by prepending the PHP error operator <link linkend="language.operators.errorcontrol">@</link> to the <function>array_walk</function> call, or by using @@ -44,9 +37,9 @@ </simpara> <note> <para> - If <parameter>func</parameter> needs to be working with the + If <parameter>function</parameter> needs to be working with the actual values of the array, specify the first parameter of - <parameter>func</parameter> as a + <parameter>function</parameter> as a <link linkend="language.references">reference</link>. Then, any changes made to those elements will be made in the original array itself. @@ -54,7 +47,7 @@ </note> <note> <para> - Passing the key and userdata to <parameter>func</parameter> was + Passing the key and userdata to <parameter>function</parameter> was added in 4.0.0 </para> </note> Index: phpdoc/en/reference/array/functions/uasort.xml diff -u phpdoc/en/reference/array/functions/uasort.xml:1.4 phpdoc/en/reference/array/functions/uasort.xml:1.5 --- phpdoc/en/reference/array/functions/uasort.xml:1.4 Sun May 12 04:19:28 2002 +++ phpdoc/en/reference/array/functions/uasort.xml Sat Oct 26 16:40:42 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <!-- splitted from ./en/functions/array.xml, last change in rev 1.2 --> <refentry id="function.uasort"> <refnamediv> @@ -14,7 +14,7 @@ <methodsynopsis> <type>void</type><methodname>uasort</methodname> <methodparam><type>array</type><parameter>array</parameter></methodparam> - <methodparam><type>function</type><parameter>cmp_function</parameter></methodparam> + +<methodparam><type>callback</type><parameter>cmp_function</parameter></methodparam> </methodsynopsis> <para> This function sorts an array such that array indices maintain @@ -30,7 +30,6 @@ comparison functions. </para> </note> - ¬e.func-callback; <para> See also <function>usort</function>, <function>uksort</function>, <function>sort</function>, <function>asort</function>, Index: phpdoc/en/reference/array/functions/uksort.xml diff -u phpdoc/en/reference/array/functions/uksort.xml:1.4 phpdoc/en/reference/array/functions/uksort.xml:1.5 --- phpdoc/en/reference/array/functions/uksort.xml:1.4 Sun May 12 04:19:28 2002 +++ phpdoc/en/reference/array/functions/uksort.xml Sat Oct 26 16:40:42 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <!-- splitted from ./en/functions/array.xml, last change in rev 1.2 --> <refentry id="function.uksort"> <refnamediv> @@ -13,7 +13,7 @@ <methodsynopsis> <type>void</type><methodname>uksort</methodname> <methodparam><type>array</type><parameter>array</parameter></methodparam> - <methodparam><type>function</type><parameter>cmp_function</parameter></methodparam> + +<methodparam><type>callback</type><parameter>cmp_function</parameter></methodparam> </methodsynopsis> <para> This function will sort the keys of an array using a @@ -53,7 +53,6 @@ ]]> </screen> </para> - ¬e.func-callback; <para> See also <function>usort</function>, <function>uasort</function>, <function>sort</function>, <function>asort</function>, Index: phpdoc/en/reference/errorfunc/functions/set-error-handler.xml diff -u phpdoc/en/reference/errorfunc/functions/set-error-handler.xml:1.9 phpdoc/en/reference/errorfunc/functions/set-error-handler.xml:1.10 --- phpdoc/en/reference/errorfunc/functions/set-error-handler.xml:1.9 Thu Oct 10 09:48:14 2002 +++ phpdoc/en/reference/errorfunc/functions/set-error-handler.xml Sat Oct 26 +16:40:42 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.9 $ --> +<!-- $Revision: 1.10 $ --> <!-- splitted from ./en/functions/errorfunc.xml, last change in rev 1.1 --> <refentry id="function.set-error-handler"> <refnamediv> @@ -12,7 +12,7 @@ <title>Description</title> <methodsynopsis> <type>string</type><methodname>set_error_handler</methodname> - <methodparam><type>string</type><parameter>error_handler</parameter></methodparam> + +<methodparam><type>callback</type><parameter>error_handler</parameter></methodparam> </methodsynopsis> <para> Sets a user function (<parameter>error_handler</parameter>) to handle Index: phpdoc/en/reference/filesystem/functions/fread.xml diff -u phpdoc/en/reference/filesystem/functions/fread.xml:1.2 phpdoc/en/reference/filesystem/functions/fread.xml:1.3 --- phpdoc/en/reference/filesystem/functions/fread.xml:1.2 Wed Apr 17 02:38:08 2002 +++ phpdoc/en/reference/filesystem/functions/fread.xml Sat Oct 26 16:40:42 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.25 --> <refentry id="function.fread"> <refnamediv> @@ -17,8 +17,8 @@ <function>fread</function> reads up to <parameter>length</parameter> bytes from the file pointer referenced by <parameter>fp</parameter>. Reading stops when - <parameter>length</parameter> bytes have been read or EOF is - reached, whichever comes first. + <parameter>length</parameter> bytes have been read or EOF + (end of file) reached, whichever comes first. </simpara> <para> <informalexample> @@ -52,6 +52,10 @@ </programlisting> </informalexample> </para> + <note> + <para> + </para> + </note> <simpara> See also <function>fwrite</function>, <function>fopen</function>, <function>fsockopen</function>, <function>popen</function>, Index: phpdoc/en/reference/funchand/functions/call-user-func-array.xml diff -u phpdoc/en/reference/funchand/functions/call-user-func-array.xml:1.3 phpdoc/en/reference/funchand/functions/call-user-func-array.xml:1.4 --- phpdoc/en/reference/funchand/functions/call-user-func-array.xml:1.3 Sun Jun 16 03:11:03 2002 +++ phpdoc/en/reference/funchand/functions/call-user-func-array.xml Sat Oct 26 +16:40:42 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <!-- splitted from ./en/functions/funchand.xml, last change in rev 1.10 --> <refentry id="function.call-user-func-array"> <refnamediv> @@ -12,12 +12,12 @@ <title>Description</title> <methodsynopsis> <type>mixed</type><methodname>call_user_func_array</methodname> - <methodparam><type>string</type><parameter>function_name</parameter></methodparam> + <methodparam><type>callback</type><parameter>function</parameter></methodparam> <methodparam choice="opt"><type>array</type><parameter>paramarr</parameter></methodparam> </methodsynopsis> <para> Call a user defined function given by - <parameter>function_name</parameter>, with + <parameter>function</parameter>, with the parameters in <parameter>paramarr</parameter>. For example: <informalexample> @@ -48,11 +48,6 @@ <function>call_user_method</function>, <function>call_user_method_array</function>. </para> - <note> - <para> - This function was added to the CVS code after release of PHP 4.0.4pl1 - </para> - </note> </refsect1> </refentry> Index: phpdoc/en/reference/funchand/functions/call-user-func.xml diff -u phpdoc/en/reference/funchand/functions/call-user-func.xml:1.2 phpdoc/en/reference/funchand/functions/call-user-func.xml:1.3 --- phpdoc/en/reference/funchand/functions/call-user-func.xml:1.2 Wed Apr 17 02:38:18 2002 +++ phpdoc/en/reference/funchand/functions/call-user-func.xml Sat Oct 26 16:40:42 +2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- splitted from ./en/functions/funchand.xml, last change in rev 1.1 --> <refentry id="function.call-user-func"> <refnamediv> @@ -12,13 +12,13 @@ <title>Description</title> <methodsynopsis> <type>mixed</type><methodname>call_user_func</methodname> - <methodparam><type>string</type><parameter>function_name</parameter></methodparam> + <methodparam><type>callback</type><parameter>function</parameter></methodparam> <methodparam choice="opt"><type>mixed</type><parameter>parameter</parameter></methodparam> <methodparam choice="opt"><type>mixed</type><parameter>...</parameter></methodparam> </methodsynopsis> <para> Call a user defined function given by the - <parameter>function_name</parameter> parameter. Take the + <parameter>function</parameter> parameter. Take the following: <informalexample> <programlisting role="php"> Index: phpdoc/en/reference/funchand/functions/register-shutdown-function.xml diff -u phpdoc/en/reference/funchand/functions/register-shutdown-function.xml:1.2 phpdoc/en/reference/funchand/functions/register-shutdown-function.xml:1.3 --- phpdoc/en/reference/funchand/functions/register-shutdown-function.xml:1.2 Wed Apr 17 02:38:19 2002 +++ phpdoc/en/reference/funchand/functions/register-shutdown-function.xml Sat +Oct 26 16:40:42 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- splitted from ./en/functions/funchand.xml, last change in rev 1.1 --> <refentry id="function.register-shutdown-function"> <refnamediv> @@ -12,10 +12,10 @@ <title>Description</title> <methodsynopsis> <type>int</type><methodname>register_shutdown_function</methodname> - <methodparam><type>string</type><parameter>func</parameter></methodparam> + <methodparam><type>callback</type><parameter>function</parameter></methodparam> </methodsynopsis> <simpara> - Registers the function named by <parameter>func</parameter> to be + Registers the function named by <parameter>function</parameter> to be executed when script processing is complete. </simpara> <para> @@ -32,7 +32,6 @@ <function>print</function>, or retrieve the contents of any output buffers using <function>ob_get_contents</function>. </para> - ¬e.func-callback; </refsect1> </refentry> Index: phpdoc/en/reference/funchand/functions/register-tick-function.xml diff -u phpdoc/en/reference/funchand/functions/register-tick-function.xml:1.2 phpdoc/en/reference/funchand/functions/register-tick-function.xml:1.3 --- phpdoc/en/reference/funchand/functions/register-tick-function.xml:1.2 Wed Apr 17 02:38:19 2002 +++ phpdoc/en/reference/funchand/functions/register-tick-function.xml Sat Oct 26 +16:40:42 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- splitted from ./en/functions/funchand.xml, last change in rev 1.12 --> <refentry id="function.register-tick-function"> <refnamediv> @@ -12,7 +12,7 @@ <title>Description</title> <methodsynopsis> <type>void</type><methodname>register_tick_function</methodname> - <methodparam><type>string</type><parameter>func</parameter></methodparam> + <methodparam><type>callback</type><parameter>function</parameter></methodparam> <methodparam choice="opt"><type>mixed</type><parameter>arg</parameter></methodparam> </methodsynopsis> <simpara> Index: phpdoc/en/reference/funchand/functions/unregister-tick-function.xml diff -u phpdoc/en/reference/funchand/functions/unregister-tick-function.xml:1.2 phpdoc/en/reference/funchand/functions/unregister-tick-function.xml:1.3 --- phpdoc/en/reference/funchand/functions/unregister-tick-function.xml:1.2 Wed Apr 17 02:38:19 2002 +++ phpdoc/en/reference/funchand/functions/unregister-tick-function.xml Sat Oct 26 +16:40:42 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- splitted from ./en/functions/funchand.xml, last change in rev 1.12 --> <refentry id="function.unregister-tick-function"> <refnamediv> @@ -12,11 +12,11 @@ <title>Description</title> <methodsynopsis> <type>void</type><methodname>unregister_tick_function</methodname> - <methodparam><type>string</type><parameter>func</parameter></methodparam> + <methodparam><type>callback</type><parameter>function</parameter></methodparam> <methodparam choice="opt"><type>mixed</type><parameter>arg</parameter></methodparam> </methodsynopsis> <simpara> - De-registers the function named by <parameter>func</parameter> so it is + De-registers the function named by <parameter>function</parameter> so it is no longer executed when a <link linkend="control-structures.declare">tick</link> is called.</simpara>
-- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php