note 47470 added to function.call-user-func

From: Date: Wed, 17 Nov 2004 14:27:31 +0000
Subject: note 47470 added to function.call-user-func
Groups: php.notes 
Request: Send a blank email to php-notes+get-80636@lists.php.net to get a copy of this message
I couldn't find any simple list of available callback variations, so I made one. It is tested on PHP 4.3.9 only. If you need to call ordinary function: call_user_func('funcFoo'); If you need to call CLASS method (NOT object): call_user_func(array('classBar', 'methodFoo')); // case insensitive If you need to call OBJECT method: call_user_func(array($objectBar, 'methodFoo')); // case sensitive If you need to call method of object of object: call_user_func(array($objectBar->objectTor, 'methodFoo')); // case sensitive If you need to call object method from within the very same object (NOT CLASS!): call_user_func(array($this, 'methodFoo')); ---- Manual Page -- http://www.php.net/manual/en/function.call-user-func.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+47470 Delete -- http://master.php.net/manage/user-notes.php?action=delete+47470&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+47470&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+47470&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+47470&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+47470&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+47470&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+47470&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#80636) next »