Re: How to use reflection API?
| From: | Jason Barnett | Date: | Wed, 21 Jul 2004 07:23:18 +0000 |
| Subject: | Re: How to use reflection API? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-191278@lists.php.net to get a copy of this message | ||
Andreas Goetz wrote:
I'm trying to use theh reflection API but can't seem to start: $func= new Reflection_Function('counter');This was changed, manuals haven't caught up yet. This should be $func = new ReflectionFunction('counter'); You can also just use the static method export, if you intend to echo the information onto the screen.
Fatal error: Class 'Reflection_Function' not found in C:\htdocs\reflection.php on line 34 According to http://sitten-polizei.de/php/reflection_api/docs/language.reflection.class.reflection_function.html this should already work.Yeah, this is about the only documentation available so far. It's mostly correct, once you change the class names (i.e. no underscore).