example and function name fixed

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@130618 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Friedhelm Betz 2003-06-08 11:48:58 +00:00
parent 317d45625b
commit a80378765d

View file

@ -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 @@ echo $obj->scalar; // outputs 'ciao'
<![CDATA[
<?php
$var = NULL;
]]>
?>
</programlisting>
]]>
</programlisting>
</informalexample>
</para>
<para>
@ -2073,7 +2073,7 @@ $var = NULL;
<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 @@ $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
?>
]]>