Re: Object method as handler functions in PHP4/Zend

From: Date: Wed, 30 Jun 1999 05:24:09 +0000
Subject: Re: Object method as handler functions in PHP4/Zend
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-7854@lists.php.net to get a copy of this message
At 22:35 29/06/99 , Manuel Lemos wrote:
Hello Zeev, On 29-Jun-99 20:26:30, you wrote: You can call an object method from outside an object in PHP 4.0, using the notation of classname::method(). Right now, only static strings are accepted for both the class name and the method name, but we may make them dynamic so that you can this notation indirectly. That's better, but I don't know if that solves the reentrancy problem. I'm not sure what you mean by dynamic, but I hope that means you can pass a string as name of a callback function and the function is called in the context of a user defined object of a given class. Thatr would mean that the $this references in the method function reference the functions of the class and the variables of the user defined object.
No, it doesn't mean that (I was talking about methods that don't really have object contexts). Frankly, I'm not really sure what you're after. You can pass that function a 'pointer' to an object, and a method name, and call $object->$method(). I think you could do that in PHP 3.0, but if you couldn't, you can do it using PHP 4.0. Zeev -- Zeev Suraski <zeev@zend.com> http://www.zend.com/ For a PGP public key, finger bourbon@netvision.net.il

« previous php.dev (#7854) next »