As Davey Shafik noted recently,
he and I have been working together on some web services for the
Zend Framework. In doing so, I've
become very familiar with PHP 5's Reflection API, and am coming to love it.
When I first read about the Reflection API in a pre-PHP 5 changelog, my
initial reaction was, "who cares?" I simply failed to see how it was a
useful addition to the language. Having done some projects recently that
needed to know something about the classes they are using, I now understand
when and how it can be used. It shines when you need to work with classes
that may not be defined when you write your code -- any code that dispatches
to other classes, basically.