From f0212d661c6b3507a2d1f5b57e6b5d6fab6c2e89 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Fri, 20 Jun 2003 06:55:46 +0000 Subject: [PATCH] - Use PEAR Coding Standards for OO examples git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@132591 c90b9560-bf6c-de11-be94-00142212c4b1 --- language/types.xml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/language/types.xml b/language/types.xml index dc58af33a6..35fbd54bbd 100644 --- a/language/types.xml +++ b/language/types.xml @@ -1,5 +1,5 @@ - + Types @@ -2250,20 +2250,18 @@ function my_callback_function() { call_user_func('my_callback_function'); // method callback examples -class my_class { - function my_callback_method() { - echo 'hello world!'; +class MyClass { + function myCallbackMethod() { + echo 'Hello World!'; } } // static class method call without instantiating an object -call_user_func(array('my_class', 'my_callback_method')); - -$obj = new my_class; - -call_user_func(array(&$obj, 'my_callback_method')); // object method call - +call_user_func(array('MyClass', 'myCallbackMethod')); +// object method call +$obj = new MyClass(); +call_user_func(array(&$obj, 'myCallbackMethod')); ?> ]]>