betz Sun Jun 8 07:48:58 2003 EDT Modified files: /phpdoc/en/language types.xml Log: example and function name fixed Index: phpdoc/en/language/types.xml diff -u phpdoc/en/language/types.xml:1.113 phpdoc/en/language/types.xml:1.114 --- phpdoc/en/language/types.xml:1.113 Wed Jun 4 17:29:15 2003 +++ phpdoc/en/language/types.xml Sun Jun 8 07:48:58 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.113 $ --> +<!-- $Revision: 1.114 $ --> <chapter id="language.types"> <title>Types</title> @@ -2036,9 +2036,9 @@ <![CDATA[ <?php $var = NULL; -]]> ?> - </programlisting> +]]> +</programlisting> </informalexample> </para> <para> @@ -2073,7 +2073,7 @@ <sect2 id="language.types.callback"> <title>callback</title> <para> - Some functions like <function>call_user_function</function> + Some functions like <function>call_user_func</function> or <function>usort</function> accept user defined callback functions as a parameter. Callback functions can not only be simple functions but also object methods including static class @@ -2116,7 +2116,7 @@ function foobar() { echo "hello world!"; } -call_user_function("foobar"); +call_user_func("foobar"); // method callback examples class foo { @@ -2125,11 +2125,13 @@ } } +// static class method call without instantiating an object +call_user_func(array("foo", "bar")); + $foo = new foo; -call_user_function(array($foo, "bar")); // object method call +call_user_func(array($foo, "bar")); // object method call -call_user_function(array("foo", "bar")); // static class method call ?> ]]>
-- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php