Do you have a question? Post it now! No Registration Necessary.  Now with pictures!


Having experimented with the spl_autoload functions, the following questions  
came to my mind:

1) In which order are the possible path/extension combinations tried by  
spl_autoload()? It seems that "myclass.php" is always found before  
"myclass.mod.php", regardless of the order in which extensions or include  
paths are given.

2) Which PHP functions invoke autoload? is_subclass_of() seems to invoke it  
for both parameters, even though it doesn't seem to make sense for the  
second one.

3) If a class is not found, spl_autoload throws a LogicException. This is,  
IMHO, a bit stupid for functions like class_exists(). Can this behaviour be  
controlled somehow?

4) Having spl_autoload, is __autoload obsolete?


Site Timeline