Re: add fn_flags to getMethod() result (reflection)
| From: | Marcus Boerger | Date: | Thu, 19 Feb 2004 15:32:49 +0000 |
| Subject: | Re: add fn_flags to getMethod() result (reflection) | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-8003@lists.php.net to get a copy of this message | ||
Hello Pierre-Alain,
Thursday, February 19, 2004, 3:51:41 PM, you wrote:
> Hello,
> Regarding the question about how to know if a method is declared static
> or not, I add the fn_flags to the result (flags property) of
> getMethod();. I tested it with PHP userland classes but not internal
> objects. This new property reflects the internal fn_flags in
> zend_function struct. The constants required are already available so
> it's easy to get the method type.
> If I missed some other reflection methods which already provide this
> info, please point me to them :)
here you go:
php -r '$m = new reflection_method("reflection_method","export");
var_dump($m->isStatic());'
--
Best regards,
Marcus mailto:helly@php.net