Hello There,
I have been using the cool reflection class in my framework. I wonder whether or not ReflectionClass is future-compatible? For example, in PHP5.3 or PHP6.
Thanks
Hello There,
I have been using the cool reflection class in my framework. I wonder whether or not ReflectionClass is future-compatible? For example, in PHP5.3 or PHP6.
Thanks
Yes, go4it!
Reflection is quite new and used in many big frameworks like Zend Framework or Doctrine ORM.
Classes that are bundled with PHP don't tend to just "disappear" ; especially classes that have been added only "lately" -- the Reflection API has only been added in PHP 5.
For PHP 5.3, it is still here (classes like that don't go away in a minor version) ; and, in fact, it is being improved with PHP 5.3.2 -- there is a new method, from what I've heard.
For PHP 6... Well, always in motion the futur is, as one would say... But I'd bet the reflection API will stay : it is really useful, is a great addition to the language, and is used by several modern tools.