Re: [PHP4BETA] Testing the existence of a method

From: Date: Wed, 05 Jan 2000 18:52:25 +0000
Subject: Re: [PHP4BETA] Testing the existence of a method
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-8929@lists.php.net to get a copy of this message
I have found the function "method_exists($object, $method_name)" in zend_builtin_functions.c to be exactly what I needed... Hope this can help someone else ;=) Eric PS: is there some documentation available on these new features ? Eric van der Vlist wrote: > > Hi, > > With PHP3 (3.0.11), I was using gettype to test if a method was > available (the return code was "user function" when the method was > existing, "unknown type" if not). > > With PHP4 (latest CVS), gettype returns "unknown type" in all the cases > (when the method exists or not). > > Is there another way to test the existence of a method with PHP4 ? > > Thanks > > Eric > > -- > ------------------------------------------------------------------------ > Eric van der Vlist Dyomedea > > http://www.dyomedea.com > http://www.ducotede.com > ------------------------------------------------------------------------ > > -- > PHP 4.0 Beta Mailing List <http://www.php.net/version4/> > To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net > For additional commands, e-mail: php4beta-help@lists.php.net > To contact the list administrators, e-mail: php4beta-admin@lists.php.net -- ------------------------------------------------------------------------ Eric van der Vlist Dyomedea http://www.dyomedea.com http://www.ducotede.com ------------------------------------------------------------------------

« previous php.version4 (#8929) next »