Purpose of PHP ReflectionClass Apart from Documenting
Posted on 2009-06-30
I'm new to the concept of reflection. I have read into the concept but I'm not sure why it should be used apart from documenting the code.
Invoking a method of a certain class via PHP ReflectionClass is more complicated than simply invoking the method by instantiating the class itself. So, why is ReflectionClass necessary?
I understand that reflection can avoid hardcoding. Could you offer some examples of using the PHP ReflectionClass which makes coding more efficient?