Class method reference
| From: | Nathan Cassano | Date: | Fri, 09 Feb 2001 22:10:21 +0000 |
| Subject: | Class method reference | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-39021@lists.php.net to get a copy of this message | ||
Does anyone know how to pull a function reference from a class method?
Here's why,
class myclass(){
var $myarray;
function mysort() {
/* User sort fails */
usort($this->myarray, $this->mycompfunction);
/* Or */
usort($this->myarray, "mycompfunction");
}
function mycompfunction() {
}
}
The sort fails because the member function mycompfunction() is not
referencable. Any ideas?