Dynamically rename a class
Is it possible to dynamically rename a class?
It is, well it's methods:
http://php.net/manual/en/function.runkit-method-redefine.php
@JoyceBabu I can add this feature at least for user classes, but we need to figure out how it should affect the class' objects, the class' succesors, their objects, code lines which use the class and so on.
I have a similar use-case for testing purposes. I want to dynamically unload a class if it's already loaded into memory and then use class_alias() to alias another class to the same name. If I could rename the class with runkit, then, presumably, I wouldn't need to unload it.