From a80378765d7c7b3adebe6d8fc1ade20061002977 Mon Sep 17 00:00:00 2001 From: Friedhelm Betz Date: Sun, 8 Jun 2003 11:48:58 +0000 Subject: [PATCH] example and function name fixed git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@130618 c90b9560-bf6c-de11-be94-00142212c4b1 --- language/types.xml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/language/types.xml b/language/types.xml index 243850bd03..2e8817ff08 100644 --- a/language/types.xml +++ b/language/types.xml @@ -1,5 +1,5 @@ - + Types @@ -2036,9 +2036,9 @@ echo $obj->scalar; // outputs 'ciao' ?> - +]]> + @@ -2073,7 +2073,7 @@ $var = NULL; callback - Some functions like call_user_function + Some functions like call_user_func or usort 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 @@ $var = NULL; function foobar() { echo "hello world!"; } -call_user_function("foobar"); +call_user_func("foobar"); // method callback examples class foo { @@ -2125,11 +2125,13 @@ class foo { } } +// 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 ?> ]]>