Re: Reflection API
| From: | Alan Knowles | Date: | Tue, 01 Jul 2003 01:07:02 +0000 |
| Subject: | Re: Reflection API | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-3068@lists.php.net to get a copy of this message | ||
It would be alot nicer if you could provide the majority of these as object variables (and/or) functions, it would enable
print_r(new PHP_Function('counter'));
which would save a lot of messing around, and writing code for general queries..
Regards
Alan
$obj = new PHP_Function("counter"); print $obj->getName()." was decared in ".$obj->getFileName()." starting at ".$obj->getStartLine(). "and ending at ".$obj->getEndline."\n"; print "Here is what it's docs have to say: "$obj->getDocComment(). "\n"; if($statics = $obj->staticVariables()) {print $obj->getName()." has the following static variables:\n".print_r($statics);} print $obj->invoke(); Something like that.