The class_alias function seems to immediately load the class into memory when the statement is executed, and not the first time the class is actually used. Is it possible / recommended to install some kind of lazy loading mechanism for class aliases?
For example, it is possible to store aliases in an array, and in the __autoload function, check this array and define an alias when the class is actually used.
source share