Pointer to a method

From: Date: Mon, 19 Feb 2001 19:01:14 +0000
Subject: Pointer to a method
Groups: php.dev 
Request: Send a blank email to php-dev+get-46944@lists.php.net to get a copy of this message
I need to get a pointer to a method, something like: class SomeClass { function foo() { echo "HiYa!"; } } MyClass = new SomeClass; Now, the only way to access the function foo is $MyClass->foo(); but I want to get a pointer to that method wich I could store in an array, something like: $Pointer = "MyClass->foo"; And later, execute the method by doing: $$Pointer(); But this doesn't works ... Why? How can I do this? ___________________ Llorenç Herrera www.Hexoplastia.com

« previous php.dev (#46944) next »