note 107476 deleted from functions.anonymous by danbrown
| From: | danbrown@php.net | Date: | Thu, 10 May 2012 21:13:20 +0000 |
| Subject: | note 107476 deleted from functions.anonymous by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-187856@lists.php.net to get a copy of this message | ||
Note Submitter: yuriy at internetcommerce dot ca
----
Expanding on the previous post. You do not need __call() function. Just call call_user_func_array()
function directly as in the example below.
class foo {
public $test;
public function __construct(){
$this->test = function($a) {
print $a;
};
}
}
$f = new foo();
call_user_func_array($f->test, array('d'));