note 76237 deleted from function.call-user-func by danbrown

From: Date: Sat, 19 Jul 2008 20:59:53 +0000
Subject: note 76237 deleted from function.call-user-func by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-141736@lists.php.net to get a copy of this message
Note Submitter: Mr.KTO ---- 2lsblsb: I'm agree what call_user_func_array is a better way for passing args by reference But now for this I prefer variable-functions. E.g. set a callback in class: if ($this->event) {$func = $this->event; $func($obj);} This allows you to choose to recive arguments by reference or not in function declaration $some_class->event = "my_event"; function my_event(&$obj) { //... }

« previous php.notes (#141736) next »